[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: swap not being used



On Sun, Dec 22, 2002 at 02:40:21PM +0100, martin f krafft wrote:
> I just put a new harddisk into one of the workstations here, remade
> partitions, rsync'd the system over, then created the swap space, then
> booted, and it all worked - except for swap.
> 
> here's what i did:
> 
>   mother:~# grep swap /etc/fstab
>   /dev/hda2 none swap sw 0 0
> 
>   mother:~# mkswap /dev/hda2
>   Setting up swapspace version 1, size = 1019928576 bytes
> 
>   mother:~# swapon /dev/hda2
> 
>   mother:~# cat /proc/swaps
>   Filename                        Type            Size    Used    Priority
>   /dev/hda2                       partition       996020  0       -1
> 
>   mother:~> free
>                total       used       free     shared    buffers     cached
>   Mem:        516580     475844      40736          0     170540     224736
>   -/+ buffers/cache:      80568     436012
>   Swap:       996020          0     996020
> 
> now say i'll start openoffice and mozilla and a couple of others, just to
> consume RAM. the system will not use the swap space. any idea why not?

But it still works, right?  It really depends on which kernel you're
using.  2.2 kernels seem to like to keep stuff in RAM until you really
need the space; it'll then swap.  Early 2.4 kernels just seemed to
randomly go into swap-storm-mode under load and swap your entire RAM out
onto disk, rendering your system unusable for long periods.  Recent 2.4
kernels (or older ones with the -aa VM system, or the -ac patches that
included them) work much better, and keep just the right balance of
ram/swap usage.  

Anyhow, you have 512MB of RAM, quite your complaining :)

-rob

Attachment: pgpo6r4ylfoYQ.pgp
Description: PGP signature


Reply to: