View previous topic :: View next topic |
Author |
Message |
adbge n00b
Joined: 27 Dec 2009 Posts: 2
|
Posted: Sun Dec 27, 2009 6:56 am Post subject: [SSD][Filesystem] Ideal filesystem for SSD based notebook? |
|
|
I'm trying to decide what filesystem or filesystems to use for a fresh Gentoo install on an OCZ Vertex SSD drive. The drive is within a notebook PC.
What I'm looking for in a filesystem:
- It's a mobile PC. I want to be able to boot this thing fast.
- Again, mobile PC -- so it'll be booted more often than a desktop, but I don't need to worry about recovering from an unexpected power failure (dedicated power supply.)
- Typical usage: web browsing, word processing, and streaming media from a network drive. CPU intensive tasks are for a different PC.
- Small file performance > large file performance.
- I'm more interested in efficiency and performance than compression.
Anyways, feel free to post whatever you got. Informative articles, unrelated SSD tweaks, filesystem rants, pictures of your ex. Whatever, use your imagination. |
|
Back to top |
|
|
Cygon Tux's lil' helper
Joined: 05 Feb 2006 Posts: 107 Location: Germany
|
Posted: Sun Dec 27, 2009 10:53 am Post subject: |
|
|
I just finished installing Gentoo on an Intel SSD.
From what I've read, I think your best candidates would be XFS and ext4. Both deliver cutting edge performance and have a 'nobarrier' option that makes them fly by disabling safety flushes of the drive's cache. A laptop would be ideal. Both file systems don't like unclean shutdowns - especially XFS is known to leave 0-bytes embedded in files that were being modified at that time.
Another thing that might affect performance would be the file system's alignment. It was a real odyssey collecting informations about how to perform alignment, so I made a small article from what I've learnt:
Aligning an SSD on Linux
In short, I've manually set the (virtual) heads and sectors number in fdisk to guarantee its cylinder boundaries are a multiple of by SSD's erase block size and then used --stride and --stripe-width (for mkfs.ext4) to make my file system try to align writes. There's lots of advice on the OCZ forums as well:
OCZ Forums: Tips, tweaks and alignment |
|
Back to top |
|
|
cach0rr0 Bodhisattva
Joined: 13 Nov 2008 Posts: 4123 Location: Houston, Republic of Texas
|
Posted: Sun Dec 27, 2009 7:21 pm Post subject: |
|
|
Cygon wrote: | - especially XFS is known to leave 0-bytes embedded in files that were being modified at that time.
|
That's an ext4 bug actually - I've never heard of it happening with XFS.
Also worth noting, XFS should always be mounted with logbufs=8, otherwise using it is pointless really.
But alas every benchmark I've seen has shown XFS to be one of the *worst* performers on SSD (I say this as an XFS fan)
@original poster:
ext2. No, I am not kidding. Your main concern with an SSD is going to be longevity and reliability. When you consider as well, ext2 actually outperforms a number of the more modern file systems on an SSD, for me it's a no brainer.
We had a discussion on the topic over on OTW, might have a read through - https://forums.gentoo.org/viewtopic-t-805181.html _________________ Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash |
|
Back to top |
|
|
kernelOfTruth Watchman
Joined: 20 Dec 2005 Posts: 6111 Location: Vienna, Austria; Germany; hello world :)
|
Posted: Tue Dec 29, 2009 1:43 pm Post subject: |
|
|
cach0rr0 wrote: | Cygon wrote: | - especially XFS is known to leave 0-bytes embedded in files that were being modified at that time.
|
That's an ext4 bug actually - I've never heard of it happening with XFS.
Also worth noting, XFS should always be mounted with logbufs=8, otherwise using it is pointless really.
|
not only,
this also happened with XFS for me ...
filesystems I'd use (I don't have SSD drives):
btrfs, ext2 (disadvantage of VERY long fsck-times), reiser4
--> you should avoid filesstems with journalling which do an excessive amount of it or often need to sync to disks ... _________________ https://github.com/kernelOfTruth/ZFS-for-SystemRescueCD/tree/ZFS-for-SysRescCD-4.9.0
https://github.com/kernelOfTruth/pulseaudio-equalizer-ladspa
Hardcore Gentoo Linux user since 2004 |
|
Back to top |
|
|
drescherjm Advocate
Joined: 05 Jun 2004 Posts: 2790 Location: Pittsburgh, PA, USA
|
Posted: Tue Dec 29, 2009 3:50 pm Post subject: |
|
|
Quote: | That's an ext4 bug actually - I've never heard of it happening with XFS. |
This used to happen a lot with XFS but that was back in 2.6.22 and we are now at 2.6.32.
With that said I have made the mistake of using xfs for a root filesystem in the past. And this has nothing to do with 0 byte files. I have never seen this happen in the real world mostly because gentoo is a very stable platform.
As far as performance I do not know but XFS is noticably slower than (ext3, ext4, reiserfs) at operations that access thousands of small files (like portage). Not sure how this will effect SSDs.
For the last few months I have my main box at home on an Intel 80GB and I use ext4. _________________ John
My gentoo overlay
Instructons for overlay |
|
Back to top |
|
|
cach0rr0 Bodhisattva
Joined: 13 Nov 2008 Posts: 4123 Location: Houston, Republic of Texas
|
Posted: Tue Dec 29, 2009 8:28 pm Post subject: |
|
|
kernelOfTruth wrote: |
this also happened with XFS for me ...
|
I'll take your word for it, you know this stuff better than I do.
I mean I'd heard of data loss issues with XFS, but not specifically the zero-byte file issue.
Though..reiserv4? I didn't think it was anywhere near stable enough to put into production. The benchmarks I've seen have been very, very promising, but I've been steering well clear of it until some of the niggling issues I've seen posted on LKML are sorted out. Same goes for btrfs and nilfsv2 - if the performance benefit is going to barely be noticeable (as I would think it would be on an SSD), and you're going to wear the drive out faster (albeit minimally) unless you dumb the file systems down to the point of being as simplistic as ext2 anyway, why not just go ext2?
drescherjm wrote: |
As far as performance I do not know but XFS is noticably slower than (ext3, ext4, reiserfs) at operations that access thousands of small files (like portage). Not sure how this will effect SSDs.
|
understood and agreed - honestly I'm very picky about where I use XFS; just as you said, for partitions where I know the bulk of my files are going to be reasonably large, I go with XFS. My general rule of thumb has been, if average file <3MB go with reiserv3, if average file >3MB go with xfs.
It should be noted I'm not suggesting he use XFS on his SSD (hopefully that was clear?), just that if he does no point in doing so unless mounting with logbufs=8.
drescherjm wrote: |
For the last few months I have my main box at home on an Intel 80GB and I use ext4. |
Standard rotational disk here, but I have / on ext4 on my laptop. Power loss is not a concern, as it is a laptop with a functional battery, and it shuts itself down cleanly when battery gets too low.
I chose it out of curiosity as much as anything - i back things up regularly from laptop to my server, so I can afford to experiment. _________________ Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash |
|
Back to top |
|
|
drescherjm Advocate
Joined: 05 Jun 2004 Posts: 2790 Location: Pittsburgh, PA, USA
|
Posted: Tue Dec 29, 2009 8:45 pm Post subject: |
|
|
Quote: | I go with XFS. My general rule of thumb has been, if average file <3MB go with reiserv3, if average file >3MB go with xfs. |
That is a second point. ext3 and reiserfs are noticeably slower on large files where xfs and ext4 (with extents - not sure if you can turn these off anymore) are fast. _________________ John
My gentoo overlay
Instructons for overlay |
|
Back to top |
|
|
cach0rr0 Bodhisattva
Joined: 13 Nov 2008 Posts: 4123 Location: Houston, Republic of Texas
|
Posted: Tue Dec 29, 2009 8:52 pm Post subject: |
|
|
drescherjm wrote: |
That is a second point. ext3 and reiserfs are noticeably slower on large files where xfs and ext4 (with extents - not sure if you can turn these off anymore) are fast. |
No idea. Even still, I'm not sure how much of that or many of the key features of modern FS are significant on an SSD. I mean if they get you a .03second improvement in certain operations (since an SSD is fast already), but reduce the life span of the disk, I'd think you'd want to remove most of their modern features to the point they're effectively no different from ext2 on the performance end.
I am very much not an expert on file systems though, so much of what I say is things that I heard elsewhere, that made sense to me. _________________ Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash |
|
Back to top |
|
|
xaviermiller Bodhisattva
Joined: 23 Jul 2004 Posts: 8710 Location: ~Brussels - Belgique
|
Posted: Tue Dec 29, 2009 9:15 pm Post subject: |
|
|
Hello,
When I had the very awfully slow SSD on my Acer Aspire One (replaced by a 1.8 hard drive), I begun with ext4, then switched to ext2 + using tmp and many things in RAM, and the system were a little more reactive.
The really big problem is the awful write performance, especially with Firefox and applications that use a cache.
So, try to avoid to write to disk, for example by using tmpfs in RAM (and upgrade the memory to maximum), or avoid the SSD by booting on a USB disk, or replace it (a 120 GB drive costed me 50 GBP in eBay). _________________ Kind regards,
Xavier Miller |
|
Back to top |
|
|
drescherjm Advocate
Joined: 05 Jun 2004 Posts: 2790 Location: Pittsburgh, PA, USA
|
Posted: Tue Dec 29, 2009 10:32 pm Post subject: |
|
|
Or get a fast SSD. I paid $185 for my used Intel 80GB 25x-m shipped. This is way more expensive than a hard drive but its much faster. Even with writes. _________________ John
My gentoo overlay
Instructons for overlay |
|
Back to top |
|
|
rjw8703 Apprentice
Joined: 14 Aug 2004 Posts: 246 Location: Auburn, Al
|
Posted: Wed Dec 30, 2009 8:27 am Post subject: |
|
|
Also, if you use ext4, you get the TRIM function, as long as you are using a kernel > 2.6.27 and a recently new drive that supports TRIM. I'm not exactly sure what TRIM does, but it does keep your drive running 95%-96% as fast as when new. If anyone knows how to get TRIM running in gentoo, I would like to know. |
|
Back to top |
|
|
syntropy n00b
Joined: 10 Oct 2009 Posts: 8 Location: Western Canada
|
Posted: Wed Dec 30, 2009 8:50 am Post subject: |
|
|
Wasn't NILFS supposed to be used on SSDs? |
|
Back to top |
|
|
rjw8703 Apprentice
Joined: 14 Aug 2004 Posts: 246 Location: Auburn, Al
|
Posted: Wed Dec 30, 2009 9:04 am Post subject: |
|
|
I do know that I have TRIM running in Win-7 using NTFS as the filesystem. What I don't know is if TRIM is running in Gentoo using the ext4 filesystem. As far as I know only NTFS and ext4 are the only filesystems that are capable of running TRIM. But I also want to say that I'm not an expert in this subject. I get most of my info from reading other peoples work, and I don't know how much expertise they have. |
|
Back to top |
|
|
cach0rr0 Bodhisattva
Joined: 13 Nov 2008 Posts: 4123 Location: Houston, Republic of Texas
|
Posted: Wed Dec 30, 2009 9:52 am Post subject: |
|
|
syntropy wrote: | Wasn't NILFS supposed to be used on SSDs? |
the one benchmark I've seen it performed really well
but
I don't know if it's yet in a state where one could consider it stable, and suitable for production use.
Someone else can chime in if that's since changed. _________________ Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash |
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Wed Dec 30, 2009 9:35 pm Post subject: |
|
|
IIRC it was btrfs (not nilfs) that was meant for SSDs and that it had a special SSD mount option.
I mentioned in another thread already but it bears repeating here, ext4 can be run without a journal just like ext2; "mkfs.ext4 -O ^has_journal /dev/sdxyz". I don't have a spare SSD to test it on but it should make a huge difference. |
|
Back to top |
|
|
SvenFischer Veteran
Joined: 05 Feb 2003 Posts: 1033 Location: Berlin
|
Posted: Wed Dec 30, 2009 11:24 pm Post subject: Well, what to do here? |
|
|
If we have this, what do you recommend:
HDD for multimedia files
SSD for windows 7 and Gentoo
------------------
Questions:
1. What kernel scheduler (noop/cfq)?
2. /root filesystem should be ext4, because of the TRIM Feature, but if the SSD has it's own internal TRIM like Intel, what to use instead?
3. Why should i disable the journal? What happens if ther's an unpropper shutdown (crash/no electricity)? Usually the kernel caches a lot, also for save actions, right? What kernel/option should I have to use to let the kernel save immediately?
4. Is it a (better) must to put all /tmp and /var to tmpfs in RAM. If so, should /var be synced to disk when shutdown or isn't the data necessary?
5. _________________ Core2Duo, 4GB RAM, AMD/ATI 4850 and nice person in front! |
|
Back to top |
|
|
adbge n00b
Joined: 27 Dec 2009 Posts: 2
|
Posted: Sat Jan 02, 2010 4:54 am Post subject: Re: Well, what to do here? |
|
|
Quote: | Quote: | What kernel scheduler (noop/cfq)? |
I usually see noop or sometimes deadline recommended for an SSD, CFQ for HDD.
Quote: | Why should i disable the journal? What happens if ther's an unpropper shutdown (crash/no electricity)? Usually the kernel caches a lot, also for save actions, right? What kernel/option should I have to use to let the kernel save immediately? |
The journal disabling is recommended because flash memory based drives have a limited number of writes (although I've never heard of anyone actually hitting this limit). There are several different parameters you can give ext3/4 to lower the number of writes without disabling the metadata entirely, (noatime etc.) You can also define how often to sync volatile memory to disk. Check out the man page for mke2fs for more info.
Quote: | Is it a (better) must to put all /tmp and /var to tmpfs in RAM. If so, should /var be synced to disk when shutdown or isn't the data necessary? |
You can safely mount /tmp and /var/tmp in RAM without concern, the data is unnecessary. |
Anyone have any recent experience with NILFS2? This article (http://www.linux-mag.com/id/7345/2/) states that NILFS can be pretty write heavy, any first hand input? |
|
Back to top |
|
|
gringo Advocate
Joined: 27 Apr 2003 Posts: 3793
|
Posted: Mon Jan 04, 2010 11:20 am Post subject: |
|
|
Quote: | states that NILFS can be pretty write heavy, any first hand input? |
it is, i have no numbers but i observed several very long and heavy writes hitting the drive when i tried nilfs, specially after system startup.
On the other hand i have to say that nilfs2 really felt like to be the quickest of them all. Again, i have no numbers, just pure user interaction with the system.
I also tried ext2 and ext4 ( with and without journalling) and i´m using btrfs now ( with compression enabled, ssd mode is enabled by default if a such a drive is detected IIRC). Ext2 and Ext4 (without journalling) felt more or less like nilfs2 and btrfs feels a bit slow, although the compression mode is very space efficient. F.ex. the hole portage tree takes no more than 140 MB in my eeepc ( distfiles and packages not included of course, they are shared via http-replicator/binhost).
There is a special TRIM operation mode for btrfs available now ( disabled by default) but i cannot test it, my ssd doesn´t support that i think. Just in case anyone wants to play with it.
I´m using btrfs and will probably stay with it for now, they haven´t even started with the serious tunning yet and hopefully they won´t change disk format again.
just my 0,02 euro.
Quote: | You can safely mount /tmp and /var/tmp in RAM without concern, the data is unnecessary. |
if you mount /var/tmp, /var/tmp/portage will be mounted too, i hope you have lots of ram.
cheers _________________ Error: Failing not supported by current locale |
|
Back to top |
|
|
yngwin Retired Dev
Joined: 19 Dec 2002 Posts: 4572 Location: Suzhou, China
|
Posted: Mon Jan 04, 2010 3:59 pm Post subject: |
|
|
I use and recommend JFS on laptops as it is more efficient (low cpu usage), mounts fast, and is a modern journaled filesystem. That being said, btrfs is starting to look like an interesting option too. _________________ "Those who deny freedom to others deserve it not for themselves." - Abraham Lincoln
Free Culture | Defective by Design | EFF |
|
Back to top |
|
|
|