On 12/16/2011 08:31 AM, Tom Worthington wrote:
On 14/12/11 19:53, Jake Anderson wrote:
On 12/12/2011 09:27 AM, Tom Worthington wrote:
... replaced the 2.5 Inch SATA disk drive with a Solid
State Disk (SSD) ...
double check your file system has options appropriate to make use of
TRIM ...
Done for the main partition. But I was not sure if I should do this
for the swap partition as well.
As I understand it, adding the "discard" option tells the system to
send an ATA_TRIM command to the solid state storage device, to tidy up
(a bit like de-fragmenting a disk):
http://sites.google.com/site/lightrush/random-1/howtoconfigureext4toenabletrimforssdsonubuntu
The general advice for SSD's is to run without swap, minimising writes
to disk etc.
That said, If you want to use swap, then use trim on it.
Basically it comes down to this.
writing to a SSD cell is moderately quick
reading from a ssd cell is blazing fast.
Overwriting a ssd cell is dog slow, it first reads the block (which can
be 128kb in size) then it erases it (this is the really slow part), then
writes back the data with the changes you have asked for (probably 4kb
if you have a standard block size).
SSD's have a wear levelling thing built in that remaps logical sectors
to physical sectors to try and avoid the erase part of an overwrite but
once all the sectors are used it can't be avoided any longer and it goes
really slowly.
Generally file systems don't actually have a mechanism to "delete" or
erase data, there's no point on magnetic media as writes are always the
same speed.
TRIM sends erase commands to the disk so it can do that slow erasing at
its leisure (aka when your not waiting for it ;->)
You should be using TRIM on everything that touches the disk, otherwise
it'll keep filling up its empty blocks table with stuff from your swap
writes.
I haven't verified it but logic seems to dictate "cleanup" can be
accomplished without a security erase by writing a huge file to the disk
and deleting it with trim support.
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html