PDA

View Full Version : 76% memory usage



jmitchell
Nov 29, 2007, 12:09 AM
I am running Plesk 8.1.1 on Fedore Core 6.

Since standing up this server (which had plesk pre-installed, and is the first time I have encountered plesk) the average memory use has been around 76%. If I stop all services through plesk, the memory useage goes down to about 33%.

As I only have a gig of ram in this host, this leaves me a bit concerned.

TOP and PS, reveal a few interesting things.

First, that when I start apache through plesk, it invokes about 12 apache instances.

Second, that the default plesk image is rather large.

So, my question is this. Assuming that the the plesk image is itself about 275 MB, can I trim this down to something more reasonable. I don't need all the the additional skins, languages, published applications etc... just apache, php, mysql and an SMTP server (SMTP itself would be jsut fine). If I can trim this down, what is the safest method.

THank you in advance.

atomicturtle
Nov 29, 2007, 06:29 AM
Free memory is really free + cached memory, make sure you're reading the output correctly first. Heres an example:

total used free shared buffers cached
Mem: 2073924 1578840 495084 0 285612 697976


If you just look at the Free column, you'd think the box only have 495 megs free. In reality its 495 + 697 megs (1.1G). This is because applications that have been loaded into memory are not unloaded once they are no longer used. Its a performance trick, having higher cached memory in use is a good thing.

smkied
Nov 29, 2007, 06:33 AM
That's just how Linux runs, it hogs all the memory it can and loads things into it for faster response.

My server memory indicator usually looks like so:

5.9 GB of 5.9 GB used; 15.4 MB available

So if you're only using 76%, that's actually surprising that you're not using like 99%.

Don't worry about it at all, totally normal.

atomicturtle
Nov 29, 2007, 06:47 AM
Hogging is not the word I would use :P The problem here is that we're calling it the something confusing to the newcomer, it should just be Available memory (unused + cached).

I have this conversation with the windows and oracle crowd every 6 months or so on one project Im on. It gets more complicated because its a box with 128G of ram and they go into a full blown panic when "free" goes below 64G, or they see the box swap. (Swapping is another issue, but suffice to say, you will always swap and it has nothing to do with running out of memory, google anonymous mappings sometime).

jmitchell
Nov 29, 2007, 12:54 PM
The problem is not the memory useage per se - the problem is that plesk itself is taking too much. I cannot expand the RAM in the host, and I need as much as possible to run my application, hence the question - how do I trim down plesk.

J.

atomicturtle
Nov 29, 2007, 05:07 PM
Plesk meaning the httpsd process?

jmitchell
Nov 29, 2007, 11:09 PM
The three of them owned by psaserv, yes.

But also trimming down the 12 httpd processes invoked by plesk because it wants to create virtual servers for webmail.domain.com, and others....

atomicturtle
Nov 30, 2007, 06:42 AM
The virtual servers would have virtually (heh) no effect on memory use. The number of instances of the daemon relate to the minimum number of child processes waiting for a request, they share memory between them. Once it starts getting requests its just going to spawn up to the MaxClients, so at most you've "freed" a few megs until the server responds to its first request.

I think a better place to start would be to turn off the services you dont need, like portmap, cups, gpm, etc. Start reading the man pages on each one if you dont know what they do.

Also check this article out explaining virtual memory in linux:

http://www.redhat.com/magazine/001nov04/features/vm/