From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96079271218581.tru64-unix-managers.marc@archive.invalid> From: "Zu, Hongya" Date: Fri, 14 Jan 2000 17:07:19 +0000 To: tru64-unix-managers Subject: SUMMARY: How to add more swap space? X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96079271218581 Original Question: Hi everyone: I got the following message:"swap space below 10 percent free" when I run some program. I checked the swap with command: # swapon -s swap space below 10 percent free Swap partition /dev/re0b (default swap): Allocated space: 98304 pages (768MB) In-use space: 4302 pages ( 4%) Free space: 94002 pages ( 95%) Total swap allocation: Allocated space: 98304 pages (768MB) Reserved space: 88516 pages ( 90%) In-use space: 4302 pages ( 4%) Available space: 9788 pages ( 9%) Please tell me the detail how to make the swap space bigger. Thanks lot! Answers: Hi Hongya, Looking at the output of swapon -s, suggests to me that you may not want to increase your swap partition, but change the way that swap is used. Check for the file /sbin/swapdefault If it exists, it will be a link to your swap partition. This means that your running swap in immediate mode, not deferred. Immediate allocates swap to processes, without utilising it. Deferred only uses swap when it needs it. If your system does not use up all available memory then it is a good idea to run in deferred mode. You just need to be careful here if you do start to use swap, that it does not use all of it, as the system will then start to kill off processes if both all of your swap and memory is used. To use deferred mode remove this link with the rm command. Re-boot the machine after having done this. To use immediate mode recreate the link, ln -s /dev/rz? /sbin/swapdefault Then re-boot. As to your original question. You can add more swap in two ways. Without having to re-boot. If you have any spare disk partitions, you can use disklabel to create a swap partition, then add that swap with the command swapon /dev/rz? wher /dev/rz? is the device that you wish to use as swap. If you intend to use this permanently, the remember to add a line referring to it in to the /etc/fstab file, with syntax similar to the following:- /dev/rz? swap2 ufs sw 0 2 The second way requires booting to single use mode, and if you've enough space free, which is contigious with your existing swap, /dev/re0b, then you can use disklabel to increase the size of the partition. No further work would be necessary. You cannot alter the size of the partition while it is in use though. I can't remember, but you may have to remove the link to /sbin/swapdefault if it exists, and any entries in the fstab file. This will ensure you boot a machine which is not using any swap. You will then be able to play around with the size of the partition. hope this helps you regards Mark ========================================================= Thanks to: Mark Charlton [m.j.charlton@qmw.ac.uk] simon.millard@barclays.co.uk zbigniew.kadziela@plsig.mail.abb.com carlos.chua@asia.paribas.com Degerness, Mandell ISTA:EX [Mandell.Degerness@gems2.gov.bc.ca] alan.c.davis@worldnet.att.net Larye D. Parkins [larye@selway.umt.edu] Freesmeyer, Mary [Mary.Freesmeyer@LendersService.com] alan@nabeth.cxo.dec.com Balaji Chandrasekar [balaji@astro.ocis.temple.edu] Cledson Souza [cledson@castelobranco.br] Joe Fletcher [joe@meng.ucl.ac.uk] Luchini, Marco [Marco.Luchini@acco-uk.co.uk] Dr. Tom Blinn, 603-884-0646 [tpb@doctor.zk3.dec.com] Dave Sill [de5@sws5.ctd.ornl.gov] ============================================================ ++++++++++++++++++++++++++++++++++++++++++ Hongya Zu Research Information Service Children's Research Institute 700 Children's Drive Columbus, OH 43205 Phone: (614) 722-2914 Fax: (614) 722-2716 Email: zuh@pediatrics.ohio-state.edu +++++++++++++++++++++++++++++++++++++++++