Sponsored Content
Full Discussion: Linux FAQ Items
Operating Systems Linux Gentoo Linux FAQ Items Post 302088226 by prashant_ohol on Sunday 10th of September 2006 05:02:25 PM
Old 09-10-2006
Tools Linux FAQ Items

Hello Guys,

Sometimes it is necessary to add more swap space after installation. For example, you may upgrade the amount of RAM in your system from 64 MB to 128 MB, but there is only 128 MB of swap space. It might be advantageous to increase the amount of swap space to 256 MB if you perform memory-intense operations or run applications that require a large amount of memory.

You have two options: add a swap partition or add a swap file. The easiest way to achieve this it to through swap file.

To add a swap file:


Determine the size of the new swap file and multiple by 1024 to determine the block size. For example, the block size of a 64 MB swap file is 65536.

At a shell prompt as root, type the following command with count being equal to the desired block size:

dd if=/dev/zero of=/swapfile bs=1024 count=65536

then

mkswap /swapfile

To enable the swap file immediately but not automatically at boot time:

swapon /swapfile

To enable it at boot time, edit /etc/fstab to include:

/swapfile swap swap defaults 0 0


The next time the system boots, it will enable the new swap file.

After adding the new swap file and enabling it, make sure it is enabled by viewing the output of the command cat /proc/swaps or free.

bingo Smilie

Let me know if you have any questions.

Prashant,
prashant ohol - System Administrator,

Last edited by prashant_ohol; 09-11-2006 at 04:50 PM..
 

3 More Discussions You Might Find Interesting

1. Post Here to Contact Site Administrators and Moderators

Unix for Dummies FAQ

I have created a small FAQ for the "Unix for Dummies" forum. Hopefully this will be useful, as there are questions which are asked (and answered) repeatedly. <A HREF="http://www.droflet.net/unix_dot_com_faq.html">http://www.droflet.net/unix_dot_com_faq.html (0 Replies)
Discussion started by: PxT
0 Replies

2. Shell Programming and Scripting

awk between items including items

OS=HP-UX ksh The following works, except I want to include the <start> and <end> in the output. awk -F '<start>' 'BEGIN{RS="<end>"; OFS="\n"; ORS=""} {print $2} somefile.log' The following work in bash but not in ksh sed -n '/^<start>/,/^<end>/{/LABEL$/!p}' somefile.log (4 Replies)
Discussion started by: Ikon
4 Replies

3. Post Here to Contact Site Administrators and Moderators

Dead link in FAQ

Dead link from FAQ, then Technical FAQ: Senior Advisor - https://www.unix.com (Was about to suggest that a O/P read this FAQ). (9 Replies)
Discussion started by: methyl
9 Replies
allocate_fs_swapmap(5)						File Formats Manual					    allocate_fs_swapmap(5)

NAME
allocate_fs_swapmap - determines when swapmap structures are allocated for filesystem swap VALUES
Failsafe Default Allowed values or DESCRIPTION
The tunable is used to determine whether to allocate all needed filesystem swap structures during the initialization of the filesystem swap device or wait until they are needed. Pre-allocation of all filesystem swap structures upon initialization saves time during later usage of the filesystem swap, and prevents later allocation failure due to physical memory contention. Dynamic allocation decreases the memory footprint of the filesystem swap system. Who is Expected to Change This Tunable? Anyone. Restrictions on Changing Changes to this tunable take effect at the next reboot. When Should the Value of This Tunable Be Raised? Systems under heavy memory load may not be able to acquire enough memory to hold the swap mapping structures for an addition of file system swap. These calls to add swap would fail with the error though presumably they would be retried. Frequent failure on file system swap addition with would merit enabling this tunable. What Are the Side Effects of Raising the Value? All the swap map structures for each file system swap device would be preallocated during swap initialization at kernel boot, increasing the memory footprint of the kernel. The amount of increase depends on the number and size of file system swap devices. When Should the Value of This Tunable Be Lowered? Systems with limited memory available to the kernel that also have limited use of file system swap devices should disable this tunable to decrease kernel memory usage. What Are the Side Effects of Lowering the Value? File system swap additions may fail with when memory contention is high. What Other Tunable Values Should Be Changed at the Same Time? None. WARNINGS
All HP-UX kernel tunable parameters are release specific. This parameter may be removed or have its meaning changed in future releases of HP-UX. Installation of optional kernel software, from HP or other vendors, may cause changes to tunable parameter values. After installation, some tunable parameters may no longer be at the default or recommended values. For information about the effects of installation on tun- able values, consult the documentation for the kernel software being installed. For information about optional kernel software that was factory installed on your system, see at AUTHOR
was developed by HP. Tunable Kernel Parameters allocate_fs_swapmap(5)
All times are GMT -4. The time now is 08:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy