Friday, September 18, 2009
swap file vs swap partition
I have read here
(http://www.softpanorama.org/Internals/Filesystems/linux_swap_filesyst...
)
that swapping to a file is slower than swapping to a partition , based
on the following reasons
1) large files(swap file) will be somewhat fragmented forcing additional disk/head movement in some cases and that you will have to deal with metadata describing where on the disk the file blocks are. this eats up both in-system filesystem cache and causes additional disk activity while you load metadata that is not in cache is there any other reason that justifies this claim OR what exactly is the tradeoff between a swap partition and a swap file ??
september storm
This depends, are you using some type of faster raid setup, where the drives run in parallel? In 2.6 kernels, the swap is no longer slower/less efficient. If you have some type of raid for faster access, it could be better than a swap partition and a swap file is something you can recreate, move around, etc. more easily than adjusting a partition. Still, I prefer a swap partition over a file, just because I'm used to it. Most drives these days are not contiguous
anyway, so even a partition isn't what it used to be. Even still, I'll probably use a physical partition for swap for many years to come.
Doug Freyburber
My preference is based on error modes not on performance issues -
Using a swap file if it is not available until the file system
is mounted. If the file system is corrupted or lost the swap file
is not available. A swap file can get included in backups if you
are not careful about exclude lists. Also a swap file is
unavailable if the drive has a hardware problem or corrupt label.
If the file is deleted the inode stays active so the space stays
used but it goes away at the next reboot by which time you may
have forgotten about an accidental deletion. The swap file can
also be renamed making it unavailable at the next reboot.
Using a swap partition none of those issues apply. It's only
unavailable if the drive has hardware problems or if the label
is corrupted. The list of problems that make it unavailable is
much shorter.
(http://www.softpanorama.org/Internals/Filesystems/linux_swap_filesyst...
)
that swapping to a file is slower than swapping to a partition , based
on the following reasons
1) large files(swap file) will be somewhat fragmented forcing additional disk/head movement in some cases and that you will have to deal with metadata describing where on the disk the file blocks are. this eats up both in-system filesystem cache and causes additional disk activity while you load metadata that is not in cache is there any other reason that justifies this claim OR what exactly is the tradeoff between a swap partition and a swap file ??
september storm
This depends, are you using some type of faster raid setup, where the drives run in parallel? In 2.6 kernels, the swap is no longer slower/less efficient. If you have some type of raid for faster access, it could be better than a swap partition and a swap file is something you can recreate, move around, etc. more easily than adjusting a partition. Still, I prefer a swap partition over a file, just because I'm used to it. Most drives these days are not contiguous
anyway, so even a partition isn't what it used to be. Even still, I'll probably use a physical partition for swap for many years to come.
Doug Freyburber
My preference is based on error modes not on performance issues -
Using a swap file if it is not available until the file system
is mounted. If the file system is corrupted or lost the swap file
is not available. A swap file can get included in backups if you
are not careful about exclude lists. Also a swap file is
unavailable if the drive has a hardware problem or corrupt label.
If the file is deleted the inode stays active so the space stays
used but it goes away at the next reboot by which time you may
have forgotten about an accidental deletion. The swap file can
also be renamed making it unavailable at the next reboot.
Using a swap partition none of those issues apply. It's only
unavailable if the drive has hardware problems or if the label
is corrupted. The list of problems that make it unavailable is
much shorter.
Thursday, September 17, 2009
Wednesday, September 16, 2009
swappiness parameter
linux 2.6 kernels added a new kernel parameter called swappiness to let the administrators tweak the way linux swaps. it is a no: from 0-100
in essence, higher values leads to more pages being swapped, and lower values leads to more applications being kept in memory, even if they are idle
the default value of swappiness is 60, you can alter it temporarily(until you next reboot) by typing as root:
echo 50 > /proc/sys/vm/swappiness
if you want to alter it permanently then you need to change the vm.swappiness parameter in the /etc/sysctl.conf file
in essence, higher values leads to more pages being swapped, and lower values leads to more applications being kept in memory, even if they are idle
the default value of swappiness is 60, you can alter it temporarily(until you next reboot) by typing as root:
echo 50 > /proc/sys/vm/swappiness
if you want to alter it permanently then you need to change the vm.swappiness parameter in the /etc/sysctl.conf file
Monday, September 14, 2009
Sunday, September 13, 2009
FTP Program with Built-in Editor (Does it Exist?)
kestal
So I have been on Ubuntu for a while, and I think I may be overlooking something obvious, but I cannot be quite sure.
callan79
I'm not sure how much success you'd have editing multiple files on the fly, but I can tell you that editing one file at a time works fine.
Just install Filezilla or gFTP, configure 'gedit' as the editor, and you'll be right. When you save the file and close gedit, the FTP program will upload the new file to the server.
I do this all the time and it works well. Filezilla works better than gFTP in my experience.
source:- http://ubuntuforums.org/archive/index.php/t-1237026.html
So I have been on Ubuntu for a while, and I think I may be overlooking something obvious, but I cannot be quite sure.
callan79
I'm not sure how much success you'd have editing multiple files on the fly, but I can tell you that editing one file at a time works fine.
Just install Filezilla or gFTP, configure 'gedit' as the editor, and you'll be right. When you save the file and close gedit, the FTP program will upload the new file to the server.
I do this all the time and it works well. Filezilla works better than gFTP in my experience.
source:- http://ubuntuforums.org/archive/index.php/t-1237026.html
Subscribe to:
Posts (Atom)