Welcome to WebmasterWorld Guest from 54.156.56.73

Forum Moderators: bakedjake

Message Too Old, No Replies

Linux webserver - high memory usage

400 Mb of 512 used!?

     

ppg

12:42 pm on Aug 20, 2002 (gmt 0)

Full Member

10+ Year Member

joined:Mar 14, 2002
posts:328
votes: 0


I'm sitting here running top on a RH 7.2 linux webserver I just got up live, this is what its telling me:

Mem: 513356K av, 414152K used, 99204K free, 72K shrd, 51700K buff

CPU usage is very low, and usage on the site is also very low at the moment, but I expect it to go up by considerable amount soon (hoping so anyway :)).

Being mainly a developer I don't know much about system administration and performance optimisation, but that doesn't look good to me....

Should I be alarmed about this?

If so does anyone have any ideas about how I can address the issue without just restarting the server?

thanks for any insight

Paul

12:55 pm on Aug 20, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Aug 10, 2001
posts:1551
votes: 10


On a healthy and active system, there's no "unused" RAM.

Linux (and probably any *nix system) will give each application the memory it requests, and then use the rest for disk caching. Depending on the reporting mechanism, you may indeed see a constant memory useage somewhere between 90 and 100%. If your web server gets more load and requests additional memory later, then the system will sync out some of the cached disk data and reallocate the gained space to the httpd.

ppg

1:04 pm on Aug 20, 2002 (gmt 0)

Full Member

10+ Year Member

joined:Mar 14, 2002
posts:328
votes: 0


Ah, so the memory is allocated, not actually used.
That makes me feel much better, many thanks for your quick response bird.

Damn I love this place :)

1:54 pm on Aug 20, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Aug 10, 2001
posts:1551
votes: 10


not actually used.

The memory is used for caching disk contents, which speads up the overall operation of the system. If a visitor requests a frequently requested page from your site, then this page is likely already present in that cache, which avoids time consuming disk accesses. The caching process is transparently managed by the system, so that no individual program needs to worry about anything.

Of course that doesn't mean that those chunks of memory aren't available for other purposes, when they are more urgently needed for a specific application. It's just a matter of not wasting any resources, and using them as efficiently as possible. A good system monitoring application will show you the seperate memory uses, btw. (eg. in different colors).

You didn't install all that RAM just for having it sit there doing nothing, did you? ;)

ppg

2:13 pm on Aug 20, 2002 (gmt 0)

Full Member

10+ Year Member

joined:Mar 14, 2002
posts:328
votes: 0


thanks for the clarification, I'll have a hunt around for a monitoring application

You didn't install all that RAM just for having it sit there doing nothing, did you?

- well I built the server and the website and got it up, but I don't want any users actually coming in and using up my system's precious resources! ;)

Thanks again bird, much appreciated.

9:32 am on Aug 25, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:July 1, 2002
posts:1424
votes: 0


Try "vmstat -w 1" and see if there is any swapping going on while your system is under considerable load.

If not, then you are fine as far as memory goes.

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members