ispCP - Board - Support
Running ISPCP on a low resources system - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Development Area (/forum-1.html)
+--- Forum: Suggestions (/forum-2.html)
+--- Thread: Running ISPCP on a low resources system (/thread-683.html)

Pages: 1 2 3


RE: Running ISPCP on a low resources system - Cube - 02-07-2008 10:08 AM

Here are some more suggestions to reduce your memory usage.

1. Fastcgi-configuration
In /etc/apache2/mods-available/fastcgi_ispcp.conf change this
Code:
-idle-timeout 300
# -singleThreshold 100
to this
Code:
-idle-timeout 300 \
-singleThreshold 100
This causes that the the last fastcgi-processes for a website terminates when it is not used.

2. Apache-prefork
Change apache to use prefork:
Code:
apt-get install apache2-mpm-prefork
You can also modify apache2.conf:
Code:
<IfModule mpm_prefork_module>
    StartServers         12
    MinSpareServers      12
    MaxSpareServers      24
    MaxClients          100
    MaxRequestsPerChild   0
</IfModule>



RE: Running ISPCP on a low resources system - BeNe - 02-07-2008 04:37 PM

Thanks for info, i will also test i!
And ee should add this also in the Wiki.

Greez BeNe


RE: Running ISPCP on a low resources system - Cube - 02-07-2008 10:04 PM

As far as I see there is nothing about this topic in the wiki. So I could create a new howto with Daff's and my suggestions.


RE: Running ISPCP on a low resources system - Cube - 02-07-2008 11:34 PM

So here it is - my first HowTo:
Run ispCP on a low resources system

Credits go to Daff.
Additionally to the suggestions in this thread I added some information about the "tuning-primer"-script.


RE: Running ISPCP on a low resources system - BeNe - 02-07-2008 11:36 PM

Fine! Thanks for the entry.

Greez BeNe


RE: Running ISPCP on a low resources system - Eminos - 02-08-2008 10:20 AM

Hi,

I am wondering a couple of things here.

1. You all speak about memory usage, but what about CPU usage? Is the CPU usage affected negativly when making these memory optimizations?

2. You guys tells us about the changes to make, but doesn't tell us what the changes actually do. On some systems the changes could be bad perhaps?

3. What is the actuall difference in running Apache as prefork instead of worker? Why is worker beeing used as default if prefork is "better" ? I guess there must be some kind of major differences that could be good or bad on different systems. Please explain this.

4. Raphael said that most servers are runlevel 2. What is the difference in running a ispCP server in runlevel 2 VS runlevel 3 ?

Thanks in advance Smile

/E


RE: Running ISPCP on a low resources system - Cube - 02-08-2008 11:18 AM

1. On most systems (especially virtual servers) memory is the limiting factor. That's because we try to minimize memory usage. Stopping unnecessary services would also save CPU time. The other changes can affect the CPU negatively - but normally not very much. And the CPU is secondarily, when you don't have enough RAM.

2. I tried to shortly explain in the howto, what the changes do. For a detailed explanation of the config parameters you should read the application's manual. The changes don't do any harm, your server could run slower, less high-performance, but that's the price for a low memory usage. Each change can be easily reverted.

3. You should read the apache docs about a detailed explanation of the differences. It was also discussed here in the forum. There is no better, it depends on the case. For a "big" apache with very high traffic worker is better, faster and even less memory consuming. But the minimum worker uses is much more than prefork. So for a low memory system prefork can be better. (I hope I explained it right.)

4. What has this to do with running ispCP on a low resources system?


RE: Running ISPCP on a low resources system - Eminos - 02-08-2008 11:23 AM

Thanks, it's a bit clearer now.

> 4. What has this to do with running ispCP on a low resources system?

Well, that's what I asked 'you' ? Is there a difference for the performance in running in runlevel 2 VS 3 ?

/E


RE: Running ISPCP on a low resources system - joximu - 02-08-2008 11:28 AM

add to 3:
there is another difference worker-prefork: Cube explained the differences from the memory point of view. You must use prefork when using mod-php

4) the runlevel may differ from distribution to distribuition - sometimes rl 2 is the "normal", sometimes it's 3 (suse??)... you also can introduce your own runlevel for your special configuration...
eg. rl 2: minimum for server, rl3: medium server, rl4: maximum server
this can be usefull for maintenance... (running another apache configuration)

/J


RE: Running ISPCP on a low resources system - Daff - 02-19-2008 02:40 AM

Thanks for the information cube. Yes, on virutal servers Memory is the most important issue to deal with. If you bought only a small virtual server in a data center you can hardly influence CPU time allocation (you just get some bla points of CPU time on another blubb scale). Only very few virtual Server Hosters assure you CPU time measured in MHZ.
So if you haven't enough CPU your Server may be slower but if you're running out of memory the system simply stops working.