Current time: 11-16-2024, 03:54 PM Hello There, Guest! (LoginRegister)


Post Reply 
Running ISPCP on a low resources system
Author Message
Cube Offline
Member
***

Posts: 740
Joined: Apr 2007
Reputation: 9
Post: #11
RE: Running ISPCP on a low resources system
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>
02-07-2008 10:08 AM
Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #12
RE: Running ISPCP on a low resources system
Thanks for info, i will also test i!
And ee should add this also in the Wiki.

Greez BeNe
02-07-2008 04:37 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Cube Offline
Member
***

Posts: 740
Joined: Apr 2007
Reputation: 9
Post: #13
RE: Running ISPCP on a low resources system
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.
02-07-2008 10:04 PM
Find all posts by this user Quote this message in a reply
Cube Offline
Member
***

Posts: 740
Joined: Apr 2007
Reputation: 9
Post: #14
RE: Running ISPCP on a low resources system
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.
(This post was last modified: 02-07-2008 11:42 PM by Cube.)
02-07-2008 11:34 PM
Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #15
RE: Running ISPCP on a low resources system
Fine! Thanks for the entry.

Greez BeNe
02-07-2008 11:36 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Eminos Offline
Junior Member
*

Posts: 159
Joined: Jan 2007
Reputation: 0
Post: #16
RE: Running ISPCP on a low resources system
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
02-08-2008 10:20 AM
Find all posts by this user Quote this message in a reply
Cube Offline
Member
***

Posts: 740
Joined: Apr 2007
Reputation: 9
Post: #17
RE: Running ISPCP on a low resources system
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?
02-08-2008 11:18 AM
Find all posts by this user Quote this message in a reply
Eminos Offline
Junior Member
*

Posts: 159
Joined: Jan 2007
Reputation: 0
Post: #18
RE: Running ISPCP on a low resources system
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
02-08-2008 11:23 AM
Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #19
RE: Running ISPCP on a low resources system
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
02-08-2008 11:28 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Daff Offline
Junior Member
*

Posts: 37
Joined: Oct 2006
Reputation: 0
Post: #20
RE: Running ISPCP on a low resources system
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.
02-19-2008 02:40 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 3 Guest(s)