Swap


Table of Contents

SWAP File 
SWAP File 
mount swap in /tmp 
Add swapfile 
increase swap file space 
Mount /tmp in swap 
Mount /tmp in swap 
Mount /tmp in swap 
swap space problem 
swap space problem 
swap space problem 
Swap File Size 
Swap File Size 
format the swap patition 
Windows swap file 

SWAP File 

Newsgroups: comp.os.linux.misc
Date: 2002-09-05 16:35:24 PST
> written out to the console talking about SWAP and some kernel messages. Is
> there some kind of diagnostics i can run on 1) the hard disks in the machine
> and 2) how do I evaluate my swap space?
  1. Post the messages. ALWAYS post the messages.
  2. If you want to check your hard disk for errors (no way of determining that this is what you mean) then #man fsck
  3. To see what your Linux swap-space (NOT a file) is doing, type: #free This will show you how much memory (real & swap) the system is using.
  4. check the system load with #uptime (5, 10 & 15 min. averages) or #top (continuous)

On an IDE system it is usual for samba to consume anything up to 50-60% of the CPU load when transferring large files - my Celeron 533 on a (badly designed) VIA motherboard uses about half the CPU time to reach its top IDE transfer speed of 5 MB/sec… which, frankly, sucks.

And read (and learn to understand) the samba log files - if you increase the log level for the smbd process to 3 or 4 you'll get more debug info than you can read in a YEAR…

Jeroen Geilman @adaptr.nl

SWAP File 

>How's this swap?
>
>#free
>             total       used       free     shared    buffers     cached
>Mem:         30792      17584      13208      11836       3044       8824
>-/+ buffers/cache:       5716      25076
>Swap:        66996          0      66996

That actually doesn't tell much. You have, roughly, 32 Mb of RAM and 64Mb of swap, which gives you about 96Mb of Virtual Memory. Not much. I would recomment adding another 100Mb, at least, of swap space.

It is also obvious that you have recently booted your box. No swap at all is used, and there is more "free" memory than is being used by buffers and cache put together!

What are the chances your problem was simply that you ran out of Virtual Memory space? If you were running Emacs and had any kind of an image editing or even image veiwing program running… that would make it very possible to just eat all of your swap space. Heck, netscape has a memory leak that can do that in nothing flat!

If you have X running you might try using xsysinfo to allow you to graphically watch what your box is doing.

Floyd Davidson @ptialaska.net