This is a discussion on slackware-current not using swap? within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> Hello, I recently noticed that some of my programs (mplayer for instance) would crash with an allocation error (BadAlloc), ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hello, I recently noticed that some of my programs (mplayer for instance) would crash with an allocation error (BadAlloc), as if I had run out of memory, and when I checked free, I noticed that my swap partion wasn't being used at all. [jobo - 16:51:40 ~]$ free total used free shared buffers cached Mem: 246936 242196 4740 0 8964 127344 -/+ buffers/cache: 105888 141048 Swap: 687952 0 687952 Since I'm using swaret to keep my system updated with slackware-current, I figured current was the issue, and when I checked another machine I had running current, it had the same problems with swap. Have anyone else experienced this problem with current? regards Brian Graversen |
| |||
| Brian Graversen wrote: > I recently noticed that some of my programs (mplayer for instance) > would crash with an allocation error (BadAlloc), as if I had run out > of memory, and when I checked free, I noticed that my swap partion > wasn't being used at all. what does 'cat /proc/swaps' say? perhaps all you need is a swapon. if so, you should check why swap isn't activated upon boot. -- Joost Kremers joostkremers@yahoo.com Selbst in die Unterwelt dringt durch Spalten Licht EN:SiS(9) |
| |||
| Brian Graversen wrote: > Hello, > > I recently noticed that some of my programs (mplayer for instance) > would crash with an allocation error (BadAlloc), as if I had run out > of memory, and when I checked free, I noticed that my swap partion > wasn't being used at all. > > [jobo - 16:51:40 ~]$ free > total used free shared buffers > cached > Mem: 246936 242196 4740 0 8964 > 127344 > -/+ buffers/cache: 105888 141048 > Swap: 687952 0 687952 > > Since I'm using swaret to keep my system updated with > slackware-current, I figured current was the issue, and when I checked > another machine I had running current, it had the same problems with > swap. > > Have anyone else experienced this problem with current? > > regards > > Brian Graversen Hi, What kernel do you use? I think 2.6.x :-) if so,do: mkswap -v1 /dev/hxx swapon -a rintek |
| |||
| rintek <rintek@wuuk.sulawesi> wrote in message > What kernel do you use? > I think 2.6.x :-) if so,do: Yes, 2.6.3 and 2.6.6 on the two different machines > mkswap -v1 /dev/hxx > swapon -a I tried that (after first running swapoff -a), and then I let the machine work on some different programs for a while, but it still doesn't use swap /var/log/messages states that the swap is added without problems (the only strange this is that the priority keeps dropping by one, each time I re-add the swap). May 13 10:38:50 Jupiter kernel: Adding 473876k swap on /dev/hda5. Priority:-4 extents:1 regards Brian Graversen |
| |||
| jobo@daimi.au.dk (Brian Graversen) wrote: >rintek <rintek@wuuk.sulawesi> wrote in message > >> What kernel do you use? >> I think 2.6.x :-) if so,do: > >Yes, 2.6.3 and 2.6.6 on the two different machines > >> mkswap -v1 /dev/hxx >> swapon -a > >I tried that (after first running swapoff -a), and then I let the >machine work on some different programs for a while, but it still >doesn't use swap The -v1 option goes /way/ back, and is unlikely to be significant. Incidentally, I've just upgraded two machines from 2.6.0 to 2.6.6, and the first of them has been up for a day and a half now, and has yet to use 1 byte of swap. Mighty suspicious... If, by tomorrow, nothing gets paged out just because it was sleeping too long I'll probably back off to 2.6.5 to see if that changes. >/var/log/messages states that the swap is added without problems (the >only strange this is that the priority keeps dropping by one, each >time I re-add the swap). > >May 13 10:38:50 Jupiter kernel: Adding 473876k swap on /dev/hda5. >Priority:-4 extents:1 Hmmm... I just tried that, and it didn't change in my case. However, I do specify the priority in /etc/fstab: /dev/sdb1 swap swap defaults,pri=1 0 0 /dev/sdc1 swap swap defaults,pri=1 0 0 /dev/sdd1 swap swap defaults,pri=1 0 0 /dev/sde1 swap swap defaults,pri=1 0 0 -- Floyd L. Davidson <http://web.newsguy.com/floyd_davidson> Ukpeagvik (Barrow, Alaska) floyd@barrow.com |
| |||
| Floyd L. Davidson <floyd@barrow.com> wrote: >Incidentally, I've just upgraded two machines from 2.6.0 to >2.6.6, and the first of them has been up for a day and a half >now, and has yet to use 1 byte of swap. Mighty suspicious... > >If, by tomorrow, nothing gets paged out just because it was >sleeping too long I'll probably back off to 2.6.5 to see if that >changes. If you want your system swap more, try echo 100 > /proc/sys/vm/swappiness The value can be between 0 and 100, the default is 60. |
| |||
| On Wed, 12 May 2004 15:05:13 +0000, Joost Kremers wrote: > Brian Graversen wrote: >> I recently noticed that some of my programs (mplayer for instance) >> would crash with an allocation error (BadAlloc), as if I had run out >> of memory, and when I checked free, I noticed that my swap partion >> wasn't being used at all. > > what does 'cat /proc/swaps' say? perhaps all you need is a swapon. if so, > you should check why swap isn't activated upon boot. I am experiencing the same symptoms, swap never gets used, I don't know if that is necessarily a bad thing but I would like to know if swap is at least enabled. When I do 'cat /proc/swaps' I get this: Filename Type Size Used Priority /dev/hda1 partition 506008 0 -1 I also check /proc/sys/vm/swappiness and it is set to 60. Does the priority of -1 mean that swap is enabled but will only be used when absolutely necessary? |
| |||
| Hello all, > I recently noticed that some of my programs (mplayer for instance) > would crash with an allocation error (BadAlloc), as if I had run out > of memory, and when I checked free, I noticed that my swap partion > wasn't being used at all. I'll just post a followup to my own message, perhaps it will help anyone with the same problem. I rsync'ed current, and burned a CD, and made a clean install of slackware current on one of my machines, and after only 32 minutes uptime, I have already used 208 kb of my swap partition I'm not sure whether it was some faulty upgrade with swaret, or my something else, but at least slackware-current itself is not to fault. I did notice something strange during the installation, and was wondering if anyone else have recently installed a clean copy of slackware-current. No /etc/fstab file was written to my harddrive during the installation, and lilo.conf had /dev/fd2 as root instead of /dev/hda1. I hade to manually edit those two files to make my system boot after the installation regards Brian Graversen |
| |||
| On Thu, 13 May 2004 01:40:11 -0700, Brian Graversen wrote: > /var/log/messages states that the swap is added without problems (the > only strange this is that the priority keeps dropping by one, each > time I re-add the swap). > > May 13 10:38:50 Jupiter kernel: Adding 473876k swap on /dev/hda5. > Priority:-4 extents:1 This is not strange, it is normal. It's a feature of some sort. I suppose the theory is that a user would want to specify swap devices in the order in which s/he would want them to be used. In practice, however, one should always specify priorities in fstab(5) (or at the swapon(8) command line.) Generally you'll want partitions on different physical disks to have the same priority. This might improve swap performance somewhat, by spreading out the burden of the disk I/O to different devices, even to different busses. (Whether or not that translates into a noticeable improvement is doubtful. Heavy swap usage is bad in any case. The best possible swap management does not compare to the slowest imaginable RAM usage. -- /dev/rob0 - preferred_email=i$((28*28+28))@softhome.net or put "not-spam" or "/dev/rob0" in Subject header to reply |
| ||||
| I take back what I said in my ealier post, I'm not using the swap at all. And this is with the standard 2.4.26 kernel that comes with slackware-current, so it's not an 2.6 issue. I guess current does have a problem, or perhaps I have some hardware issues Brian |