GeorgeC
11-13-2001, 04:53 AM
Yesterday my server hung itself. I checked the error logs, and found a whole bunch of entries like this:
Cannot allocate memory: couldn't spawn child process:....
Good thing I discovered the hanging fast, and had my web host take care of it. The admin told me the traffic consumed all the available RAM.
My question is, how can you tell when your server needs more RAM? I mean, I run "top" command all the time, and the numbers are always very good (0.09). Can "top" not be as encompassing as I thought it is in reporting resource usage?
Thanks,
GeorgeC
cperciva
11-13-2001, 05:14 AM
top reports the state of the VM manager queues. If you want information on memory usage, try vmstat.
GeorgeC
11-13-2001, 05:42 AM
Thanks. Is there anything in the report I should be looking for to tell me if my server requires more RAM? From what I understand a server will always try to use up most of the avail memory, which makes it hard to determine when it actually needs more.
cperciva
11-13-2001, 05:49 AM
Don't look at the "free memory"; look at the "active memory". If this approaches the physical memory in your machine then you'll start seeing significant amounts of VM disk access.
GeorgeC
11-13-2001, 06:05 AM
Got it. I did a little research, and it seems I should also be looking for "paging events", which may indicate i need more RAM: http://www.transarc.ibm.com/Library/whitepapers/tg/node61.html
This may sound like a stupied question, but what should I type to exit a top or vmstat report? Usually I just close the telnet window...
bitserve
11-13-2001, 06:55 AM
I used to press ctrl-c to exit out of top too, but then I realized I could press q for quit.
Fremont Servers
11-13-2001, 03:51 PM
I alway use ctrl- C.
I didn't know "q" works too.
:cool:
GeorgeC
11-13-2001, 04:29 PM
Ops I just ran vmstat, and telnet gave me some wierd server error, and says" core dumbed". Furthermore I now find a core file in my root directory. Did I just killed Kenny my server?
Originally posted by GeorgeC
Ops I just ran vmstat, and telnet gave me some wierd server error, and says" core dumbed". Furthermore I now find a core file in my root directory. Did I just killed Kenny my server?
It can be a hardware problem. Your RAM may be bad.
How much RAM do you havce in total?
GeorgeC
11-13-2001, 06:36 PM
Hi taz0:
I'm on one of those private server thingies (1 dedicated server divided up to multiple mini servers), so the actual amount of RAM I get is not clear. From my understanding the server has 1 gigs of RAM, with my account assigned 256 megs.
ShellBounder
11-13-2001, 10:24 PM
Be very liberal when it comes to RAM, you always need more than you think. And now is a very opportune time to buy it, a 256 meg stick costs around $40-$50 in most places. www.crucial.com is a nice place to go if you know what you're looking for.
bobcares
11-26-2001, 05:53 AM
Hi!
Everbody needs a lot of RAM... :)
RAM and hard disk space is two things where all of us are very gready.... :)
512 M to 1G is a good amount of RAM. Also the type of applications you have matter. If you are linux you could even upgrade the kernel.
The newer ones have better paging.
Have a great day :)
Regards
amar