I just got a new laptop and installed 11.1, and I want to move my swap file to a 8GB SD card I have. It seems to run very fast, so it will improve swapping speed. I created a swapfile with Partitioner, and I can delete the existing swapfile with GParted during a reboot - but I’m afraid I will make my system unbootable by doing that - don’t I need to first tell OpenSuSE what swapfile (on the new sdb) to use? I’m pretty sure it will detect the new swapfile automatically during boot, but it might choke on a missing (old) swapfile.
On 05/24/2010 11:06 AM, PattiMichelle wrote:
>
> I just got a new laptop and installed 11.1, and I want to move my swap
> file to a 8GB SD card I have. It seems to run very fast, so it will
> improve swapping speed. I created a swapfile with Partitioner, and I
> can delete the existing swapfile with GParted during a reboot - but I’m
> afraid I will make my system unbootable by doing that - don’t I need to
> first tell OpenSuSE what swapfile (on the new sdb) to use? I’m pretty
> sure it will detect the new swapfile automatically during boot, but it
> might choke on a missing (old) swapfile.
After you have the partition for the new swap file, AND run the mkswap
command to prepare that partition, then you can edit /etc/fstab and
change the entry for swap to the new disk/partition. For completeness,
you should edit the “resume=” entries in /boot/grub/menu.lst. Finally,
reboot.
Will having the swap file on a faster disk make that much difference? If
you are using the swap file very much, you would be better off with more
RAM.
I think you’re better off putting a more frequently used partition on the SSD, maybe /tmp, maybe /home (all those cache files from your web browser)? By the time you are hitting swap things are slow already.
I guess you’re right - I’ve never really run into much swap usage before - but I’m going to try using VirtualBox more, so thought swap would be good. I’m not sure what really uses up disk time - probably like you say, it would be some file that some apps or KDE use. This is a laptop and it’s maxed out at 4GB memory. maybe I should put the VM on the SD?
I think windows automatically swaps a bunch of code to the page file, but linux doesn’t do that? I never see any swap usage at all in Linux.
I do occasionally have multi-GB data files, like for HiDef video editing, so I’d like to be able to use that (faster) SD instead of the hard disk. Maybe a temporary directory there? I guess it depends on the spedific app and how it uses memory/disc, but I thought having the kernel somehow see the extra 16GB SD6 card I just bought as memory would be optimal.
A little bit of swap is touched on my system. Apparently the kernel is smart enough to swap out things that it regards as highly unlikely to be needed immediately. I don’t know the details, I just know it can use a bit of swap even if RAM is plentiful.