SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
1. I'm going to be upgrading my RAM from 1 GB to 2 GB here shortly on a Slack 12 box and instead of running an install all over again I wanted to use some free space from one of my other partitions (currently I have 1 for / 1 for swap and one for /home) to adjust my swap partition to make up for the new RAM size.
2. Also .. just what is the correct "formula" for figuring swap size? Is it 1.5 times your ram typically?
A long time ago when RAM was hideously expensive the formula was twice your RAM = swap size. Nowadays, a gig of RAM is normal and, unless you are carrying out very memory intensive compiling/programming/whatever, you don't need to follow that. Basically, whatever you have now is fine. You don't want your PC to use the swap space, the hard drive is slower than the RAM.
To add to what XavierP said: there's no reason to think that additional memory, in and of itself, causes a need for more swap space, unless you're using suspend to disk.
Think of it like this: RAM plus Swap is your total memory footprint. The swap portion can be considered a very slow version of RAM, if you like. So, adding a larger RAM area only increases the high-speed part of your total memory footprint. Unless you are increasing your RAM due to a dramatically increased need for your memory footprint (or using suspend to disk) then there is no need or advantage to increasing the swap space.
Thanks to both of you for your replies .. I'm increasing my RAM as a game I play uses a lot of RAM .. so I'll increase my RAM and just not worry about my swap area then and leave it as is ...
As to your question, just add another swap partition in your fstab after formating with mkswap.
Hi,
Not as simple as that for the OP. He seems to have his space allocated. He would first have to determine which partition would be the easiest to resize. If /home is at the end of the drive space then it would be the best candidate. The OP could then use Qparted to resize the space to allocate some free space. Of course the space would be located at a position on the drive that would not be the optimum area but would meet the needs of a system.
Then using fdisk to make the partition. Write the partition table then I would reboot to update the partition table. After that do 'mkswap -c /dev/device_assignment'. Then do an edit to include the additional swap in the '/etc/fstab'. The 'swapon /dev/device_assignment' would then turn the swap on. The '/etc/fstab' would take care of the mount during boot for the device. Of course the OP could use a 'mount -a' from the cli to mount all the file systems.
Edit: To use an increased swap because of the increase of your RAM is not really all that necessary. As stated by others in the thread. Now if your system is suspending as others have pointed out then you may need to increase your swap. But I really don't think you will see the problem with 1 GB or greater on a desktop with typical loads.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.