0

I'm running multi curl crawler with 500 open connections all time. Do you have any advices for apache/php settings in order to get best performance?

This is my settings:

<IfModule mpm_prefork_module>
    StartServers          50
    MinSpareServers       50
    MaxSpareServers      100
    MaxClients          1500
    MaxRequestsPerChild   0
</IfModule>

1 Answer 1

1

Start your crawler with a small limit of process and then run this script

ps -C httpd,apache2,apache -o rss --no-header | awk '{a=a+$1; b=b+1} END {print a" "a/b" "b}'

it will show you an average use of memory per apache process.. then you can calculate how many processes do you have on limit for your structure based on your ram.

Sign up to request clarification or add additional context in comments.

7 Comments

I can anticipate that your MaxRequestsPerChild will affect too much the memory.. set it to 10 or 100... and set ServerLimit to 1500. ps, sorry the poor english
That command gave me this result "640600 12319.2 52" but I don't understand what that means ???
640Mb total, 12,3 Mb per process, 52 processes ;)
So, what should I change in Settings? In my case CPU is overloading to 98%, but memory only 50%
are you using php 5.5 or APC module on earlier phps? it will help
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.