srpurdy

Well-Known Member
Jun 1, 2011
101
0
66
cPanel Access Level
Root Administrator
I've never actually used worker before until recently. Since I been hearing good things about it, like the fact it uses memory better. But after testing this. I went from using like 200-300 MB of memory on a server to using over 1GB just from apache. So my experience is worker is using more memory. I wanted to scale the system a bit better as the traffic on this box keeps going up. Maybe someone can explain to me what could cause that. I had a VIRT memory size of 2GB! each RES size around 80MB which was 20MB more than perfork (I run mod_security rules so this is a normal size for the RES column)

I'm thinking maybe serverlimit setting has something to do with it? I know I should do more research. :)
 

HSN-Saman

Member
Jan 11, 2013
16
0
1
www.hugeserver.com
cPanel Access Level
DataCenter Provider
MPM worker is great , so faster than MPM prefork and it uses less resources.
what's the configuration you set for MPM worker ?

I hope you have done the configuration for MPM Prefork and Serverlimit is not set to 150 which is by default for MPM Prefork ...
 

srpurdy

Well-Known Member
Jun 1, 2011
101
0
66
cPanel Access Level
Root Administrator
MPM worker is great , so faster than MPM prefork and it uses less resources.
what's the configuration you set for MPM worker ?

I hope you have done the configuration for MPM Prefork and Serverlimit is not set to 150 which is by default for MPM Prefork ...
Actually I did solve this, and I should have updated this thread. It was cause I had the limit way too high, and your right it does work quite well. :)
 

LeadDogGraphics

Well-Known Member
Feb 25, 2012
97
1
58
West Palm Beach, FL
cPanel Access Level
Root Administrator
Actually I did solve this, and I should have updated this thread. It was cause I had the limit way too high, and your right it does work quite well. :)
Would you please advise which configuration settings you adjusted and what your new limits are. I have played with Worker in the past and found it not to be low on resources but I am sure I had it set wrong, so I would like to know what you did to help out.
 

srpurdy

Well-Known Member
Jun 1, 2011
101
0
66
cPanel Access Level
Root Administrator
Would you please advise which configuration settings you adjusted and what your new limits are. I have played with Worker in the past and found it not to be low on resources but I am sure I had it set wrong, so I would like to know what you did to help out.
I ran settings like this.

<IfModule worker.c>
StartServers 2
MaxClients 40
MinSpareThreads 5
MaxSpareThreads 20
ThreadsPerChild 20
ServerLimit 4
MaxRequestsPerChild 1000
ThreadStackSize 163840
</IfModule>

If you put a really high ServerLimit your going to use a lot of memory, but this configuration was for a 1GB server with mod_security rules, and it's 64Bit so you can run higher settings depending on how much memory you have.

Memory was still a bit limited on this specific server as mysql was using quite a bit too. So just depends on what else your running.
 

LeadDogGraphics

Well-Known Member
Feb 25, 2012
97
1
58
West Palm Beach, FL
cPanel Access Level
Root Administrator
When I switched away from Worker, i went to Mod_Ruid2 because it was the only real way to get APC to play nice with PHP, which has been good, but there are questions about it's future and since cPanel has yet to get the .97 version of it running despite it being out for about a year, I wonder if it has any real future.

So I have been contemplating going back to a setup with Worker, FastCGI and APC. I may play with this, I have a 8 core 16GB ram server, so I have a bit more room to play but those numbers will give me a starting point. Thanks.