Sometimes my hard drive grinds away like a coffee grinder. Nothing bad happens on the screen and everything runs just fine, but I wonder why it occasionally goes 'crazy' like that. Most of the time the hard drive runs nice and quiet. Its a 40 gig Samsung SV4084H. I know what swapping is and I can't think why it would be swaping. I've got 384 megs of memory and gave Red Hat 7.2 128 megs of swap. Perhaps its something I have not done. Is there some method to optimize memory or hard drive space?
It really depends on what sort of programs you're running and what their memory footprint and use pattern is. Have you run 'top' to see which programs are using the most memory? If not, run 'top' at a shell prompt and press capital 'M' to sort the list by memory use. Some programs have memory leaks, too, and that will exacerbate the problem. Someone else may have suggestions for other tests to do to narrow down the source of this behaviour.
millward wrote:
Sometimes my hard drive grinds away like a coffee grinder. Nothing bad happens on the screen and everything runs just fine, but I wonder why it occasionally goes 'crazy' like that. Most of the time the hard drive runs nice and quiet. Its a 40 gig Samsung SV4084H. I know what swapping is and I can't think why it would be swaping. I've got 384 megs of memory and gave Red Hat 7.2 128 megs of swap. Perhaps its something I have not done. Is there some method to optimize memory or hard drive space?
Roundtable mailing list Roundtable@muug.mb.ca http://www.muug.mb.ca/mailman/listinfo/roundtable
If the "top" suggestion doesn't pan out,
# iostat -x 5
will tell you which partition(s) are doing the work, which might give some clues as to what the nature of the activity is.
Sean
Linux is fairly aggressive about swapping memory out even when you haven't really run out yet. Look at 'top' command for a line like:
Swap: 393616K av, 18952K used, 374664K free 72656K cached
I have 128MB installed. As you can see I have ~18MB swapped out but I am not really doing very much. X-Windows tends to be big but large parts are not used so it gets swapped out.
If you have a memory leak the amount used will creep upward the longer you leave Linux up.
Often apparently random swapping is caused by time initiated functions like NTP or other daemons. If they are quiet for a long time they get swapped out, then some timer expires and they may swap back in.
Linux swapping is a misnomer. It is actually paging. There is a big difference. Swapping waits for a shortage. Paging happens all the time, even when there is no shortage. Linux tries to stay ahead of the game by paging out unused but modified memory. Unused programs are merely unmapped from memory. Later they get mapped back in if the program should execute a portion that is not currently in memory. This can sound like swapping, but it is really paging that does not use the swap partition.
On Sat, 18 May 2002, millward wrote:
Sometimes my hard drive grinds away like a coffee grinder. Nothing bad happens on the screen and everything runs just fine, but I wonder why it occasionally goes 'crazy' like that. Most of the time the hard drive runs nice and quiet. Its a 40 gig Samsung SV4084H. I know what swapping is and I can't think why it would be swaping. I've got 384 megs of memory and gave Red Hat 7.2 128 megs of swap. Perhaps its something I have not done. Is there some method to optimize memory or hard drive space?
Roundtable mailing list Roundtable@muug.mb.ca http://www.muug.mb.ca/mailman/listinfo/roundtable