From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <20fb3052ce5bad554214eb3508a5d0d5.axp-list@archive.invalid> X-Archive-Original-Message-ID: <199712091223.NAA17997@bio6.chemie.uni-freiburg.de> Date: Tue, 9 Dec 1997 14:50:36 +0100 (MET) From: Andreas Johansson Subject: Re: [Q] problems with swap In-Reply-To: <199712091223.NAA17997@bio6.chemie.uni-freiburg.de> On Tue, 9 Dec 1997, Clemens Vonrhein wrote: > We're having some problems with our swap space. [system info snipped] > > in /etc/fstab we have: > /dev/sda5 swap swap defaults 0 0 > > But now it seems, that this swap space isn't used at all: > > # top > 1:17pm up 2:06, 4 users, load average: 0.00, 0.01, 0.00 > 50 processes: 49 sleeping, 1 running, 0 zombie, 0 stopped > CPU states: 3.6% user, 5.4% system, 0.0% nice, 91.2% idle > Mem: 256512K av, 44912K used, 211600K free, 45664K shrd, 3752K buff > Swap: 513000K av, 0K used, 513000K free 20928K cached > > # swapon -s > swapon: /proc/swaps: No such file or directory The /proc/swaps information is not available in your 2.0.30 kernel. I'm not sure when it was added, but it exists in my current 2.1.56 kernel (which sucks, don't use it!). It does not exist in any 2.0.xx kernel. Without swapon -s you can still get some more info out of the 'free' command than top displays (see way below). This is the output of 'swapon -s' on my system: ajo@wopr ~ >swapon -s Filename Type Size Used Priority /dev/sda1 partition 51192 0 -1 /dev/sdb1 partition 51192 0 -2 This has no more information than free except if there are several partitions + device and priority information (which you see when you do swapon -a). > Furthermore, the used memory is permanently growing, reaching nearly > all of the 256Mb at some point without any process running wild or any > memory intensive calculation. But even then, the swap space isn't > used. Well, this is a feature, not a bug! :) Linux uses all of your available memory for caching of filesystems, so when you want to reload files you get them from memory instead of having to reload them from disk. Watch my output of the 'free' command: ajo@wopr ~ >free total used free shared buffers cached Mem: 62656 61752 904 49416 1080 28456 -/+ buffers/cache: 32216 30440 Swap: 102384 0 102384 61752 kB of my total of 62656 kB is "used". But if you subtract the buffers and caches I have only used 32216 kB of memory. This is the number to look at. Your system won't start swapping until this starts to get close to the total memory of your system (in fact it starts to swap somewhat earlier if there are pages which haven't been used for a very long time, to free more memory for caching). > Now: > - is this specific to our kernel (local deskstation 2.0.30 hack)? We > can't go to any other kernel, since we don't have any patches for an > official kernel source (and the ones from Jay Estabrook don't work for > us yet). swapon -s needs a 2.1 kernel, but I guess you don't need that. You don't have any other problem, in my opinion. > - is it a known problem with RedHat 5.0? I don't think so - otherwise > I would have found something in the mailing archive by now ... > - do we have to configure something during kernel compiling? > - any other ideas? > > > Thanks for any hints/tips etc. I hope these questions are answered above. If you don't understand what I mean, feel free to ask more questions. /Andreas -- <-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-> : E-mail: ajo@wopr.campus.luth.se : : S-mail: Andreas Johansson, Karhusvagen 5 6:618, 977 54 Lulea, SWEDEN : : Have you had your dose of 261.62 BogoMIPS today? - Run Alpha! : <-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-> -- To unsubscribe: send e-mail to axp-list-request@redhat.com with 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com