LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Sackware64 -current & EXT4 & SSD (http://www.linuxquestions.org/questions/slackware-14/sackware64-current-and-ext4-and-ssd-795003/)

mlpa 03-12-2010 01:22 PM

Sackware64 -current & EXT4 & SSD
 
Hi, I use Slackware64 -current. I will buy a SSD drive, normaly the filesystem in my laptop is EXT4.
Is there anything that I need to know? How to improve life of the SSD?
Is journaling a good option? How to disable?

MS3FGX 03-12-2010 08:52 PM

You don't need to do anything special to support an SSD, and all modern SSDs have wear leveling technology which greatly extends their lifetime. You don't really need to worry about repetitive writes like you did with past generations of the technology. I read some articles recently that put the lifespan of a modern SSD, even with intense writing, somewhere north of 20 years.

gargamel 03-13-2010 03:13 AM

I read an article, too, on this topic. They compared Linux file systems on SSDs and concluded with a clear recommendation for ext4 with journaling for modern SSD drives. If I recall it correctly, Reiser 4 was also regarded technically excellent and very good for SSDs, and in some respects even better than ext4, but the long-term support in Linux seems less clear.

Expected lifetime of new devices is about 30 years, as MS3FGX said, even in use cases with intense writing.

gargamel

mlpa 04-05-2010 05:22 AM

And about Trim Support?
In SLackware -current is available? I need to configure something?

hemp4fuel 04-05-2010 11:24 AM

You can add 'discard' to the options of the mount point in /etc/fstab. In Linux trim = discard. Here is my fstab entry for an ssd:

Code:

/dev/sda2        /home            ext4        defaults,noatime,discard,errors=remount-ro        0  2

mlpa 04-05-2010 01:05 PM

Thanks for the reply.
I will use discard option.
And how to disable journelling?

hemp4fuel 04-05-2010 03:01 PM

From what I have read there is no real advantage to disabling journaling in ext4 with a ssd.

mlpa 04-05-2010 03:20 PM

Journallig don't write in the disk in period cycles?
Without journalling the system is faster, I think.

manwichmakesameal 04-05-2010 05:35 PM

If you are going to use an ssd, I think the overhead of the journaling is going to be negligable.

mlpa 04-05-2010 05:37 PM

Yes I will use a Corsar X128 in my laptop.
I saw some tests that show ext4 without journalling is faster.

imitheos 04-06-2010 06:43 AM

Quote:

Originally Posted by mlpa (Post 3925430)
Yes I will use a Corsar X128 in my laptop.
I saw some tests that show ext4 without journalling is faster.

Speed is good, but the primary purpose of a filesystem is to securely
store data.

You can gain some speed by using noatime that hemp4fuel suggested
and also reduce unnecessary writes, but don't disable the journal.

nicedream 04-07-2010 01:38 PM

I was reading Theodore Tso's write-up on journaled/non-journaled speeds. Disabling journaling does improve performance, but the difference does appear to be negligible. However, just like using the noatime option, scaling back or eliminating swap usage, etc, it will reduce writes to the disk which should theoretically extend the life of your drive.

The decision to use or not use journaling is a personal decision - weigh the risks vs rewards. Just be aware that without the journal there is a slightly higher chance that your drive could be left in an inconstant state and you may have data loss. But recall that not too long ago ext2 was the default fs, and even now a lot of people still say ext2 is the way to go for SSDs. I don't think there is really a "right" or "wrong" setup, because SSDs are so new and there isn't much long term evidence of what is truly the best way to go.

FWIW, I wrote up a guide of everything I did to tune my SSD, in case anyone is interested in what I found.

mlpa 04-07-2010 02:59 PM

Thanks for the tips.
I will try it.

piratesmack 04-07-2010 05:00 PM

You can change the journaling mode to writeback to improve performance a bit (Not sure how much on an SSD). I use writeback mode on my laptop, where power failure is not an issue and crashes are rare. I don't recommend this on a desktop.

To use writeback mode, run this on each of your ext4 partitions:
Code:

tune2fs -o journal_data_writeback /dev/sdxx
And add 'data=writeback' to your fstab entries:
Code:

...ext4 defaults,noatime,nodiratime,data=writeback
To go back to ordered mode (the default), do:
Code:

tune2fs -o journal_data_ordered /dev/sdxx
And of course, remove data=writeback from your fstab.

mlpa 04-07-2010 05:03 PM

I was thinking using in my laptop, because of the SSD.

I have found this tutorial for SSD drivers in Linux



All times are GMT -5. The time now is 11:11 AM.