Announcement

Collapse
No announcement yet.

Best Filesystem for SSD Netbooks?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Best Filesystem for SSD Netbooks?

    Hi

    My wife has an AAO Netbook with 8GB SSD (root & Swap) and an 8 Gb SDHC Card (home). Removed Linpus and installed UNR 9.04, which works fine.

    Both cards are formatted Ext2 (as was recommended to prevent excessive writes to the cards).

    I will shortly upgrade it to Karmic. Do you think I should switch the cards to Ext4 while I do this or is the wise thing to stick to ext 2? Any thoughts most welcome.

    #2
    Re: Best Filesystem for SSD Netbooks?

    I definitely recommend ext4, it is so much faster, just use "noatime" as a mount option, so you don't write for each read. You can also use tmpfs for /tmp and /var/tmp. This has sped up my eeepc 701 (the tmpfs), but not my Mini-9, I need to investigate the latter. But in any case this eliminates all these temporary writings.

    In practice, the netbook will most likely be obsolete way before the disk is worn out IMHO. UNless you run a webserver or something weird

    Cheers!

    Comment


      #3
      Re: Best Filesystem for SSD Netbooks?

      Thanks for that.

      Just so I am clear - does noatime turn off the journalling? I'm not sure how I would set it up either - would I edit the fstab or have it as a grub option?

      tmpfs - Would I be right in assuming that it uses system Ram rather than writing temp files to disk? Again, if you have step by step help on how to set it up I would like that very much. One point, the netbook has 1Gb Ram - is that enough to do this?

      Thanks for the help.

      Ian

      Comment


        #4
        Re: Best Filesystem for SSD Netbooks?

        noatime does not turn off journalling. There are things you can do to slow it down, however, such as "commit=x" and also using tmpfs judiciously.

        There's a blog posting by Theodore T'so on the topic, and he's the principal ext4 developer. Maybe I can find it again. He said ext4 with noatime would be his recommendation, but he also pointed out that there are significant differences in the SSD controller designs -- he mentioned the latest (as of this past Spring) from Intel and OCZ as being demonstrably better in spreading the wear. I'll see if I can find the blog and post it.

        Here: http://thunk.org/tytso/blog/2009/03/...atimerelatime/

        Here's the key quote (from April, 2009):

        If you want to use ext4 without the journal, all you need to do is to format the file system like this: “mke2fs -t ext4 -O ^has_journal /dev/sdXX”, where you need to replace /dev/sdXX with the appropriate file system.

        Most of the netbooks that have SSD’s that have reached the market to date have very cheapo, “crapola” (to use Linus’s technical term) SSD’s. This means a couple of things. First of all, they tend to be relatively bad wear leveling algorithms, so reducing unnecessary writes is key to making them last longer. Secondly, they tend to have really lousy small random write performance, which is going to impact pretty much all file systems (basically, if you think you’re going to be able to do anything more than simple word processing/spreadsheets and web browsing, you’re kidding yourself).

        Ext3 is especially problematic because the journal means that metadata gets written twice to disk, and in a write pattern that might exacerbate wear-levelling. Worse yet, because of data=ordered mode, ext3 does a lot of synchronous writes, which will be painful because these SSD have slow write speeds to begin with, and then you combine that with the slow small random write performance, and life gets really bad.

        The SSD vendors like to blame the OS, but in reality, they are the ones who are claiming that they have devices that are going to replace HDD’s, so it’s really their responsibility to create non-crap drives. As of this writing, the only drives that seem to meet that requirement are the Intel X25-M and the OCZ Vertex SSD’s. (See the Anandtech article,
        “The SSD Anthology: Understanding SSD’s and New Drives from OCZ” for more details. For an example of SSD’s trying to shift the blame away from their own crappy products, see this article from gizmodo.com.)

        So yeah, for netbooks with SSD’s that are running Linux, I would recommend the use of ext4 without the journal. This will give you the advantages of ext4’s delayed allocation, and the reduced metadata advantage of using extents versus indirect blocks will definitely help. You will need to fsck your system after a crash, but with an SSD reads are fast, and these filesystems are small enough that it shouldn’t be a major issue. Make sure you are using 2.6.30 or newer, so that you get the replace-via-rename and replace-via-truncate hueristics to work around applications who think they are too good for fsync().
        On my Asus Eee PC which has a 4GB SSD of 2007 vintage, I run ext2, and fsck it every dozen or so boots. It's been fine that way for a year and a half. But it doesn't get pushed very hard, either.

        Comment


          #5
          Re: Best Filesystem for SSD Netbooks?

          Ian,

          Besides Dibl's comments, let me add real quick

          Using noatime doesn't eliminate the journal. Noatime eliminates unnecessary writes to the disk (updating the "access" timestamp each time you READ a file), you just add it as a mount option for / (and or /home) in fstab ("kdesudo kate /etc/fstab"), it is explained here in a couple lines:
          http://tldp.org/LDP/solrhe/Securing-...hap6sec73.html

          Yes, tmpfs runs in memory, so there is no disk usage for those. If the folders are smallish this is fine with 1Gb RAM, that's exactly how much I have on the eeepc. Yesterday I tried again using tmpfs in my mini-9 running karmic, and again, it made the boot up to a full desktop almost TWICE as slow. There must be some bug somewhere. But it's worth a try. You need to add lines like this:

          Code:
          tmpfs /tmp tmpfs defaults 0 0
          tmpfs /var/tmp tmpfs defaults0 0
          However, I googled a bit and some people add extra mount options, such as:

          Code:
          tmpfs /tmp tmpfs defaults,noexec,nosuid 0 0
          tmpfs /var/tmp tmpfs defaults,noexec,nosuid 0 0
          I am not sure if that would help in my case, I will try tonight.

          Ah, I tested in different machines, and I always get considerably faster bootups with ext4, which is crucial in a laptop. Quite frankly, wear is not a concern for me. I can get a disk twice as fast as the one in my mini and twice as large for about 55USD, so if it did starting falling apart in one year or so I'll just upgrade and keep rocking. But I doubt it, my eeepc has been used like crazy for almost two years and the SSD is just fine, it was ext3 and now ext4 since Jaunty. And that SSD is a cheap bastard!

          In case you are interested, I got my Mini to boot in less than 30 seconds with a light KDE install. Details here: http://kubuntuforums.net/forums/inde...opic=3106858.0

          Comment


            #6
            Re: Best Filesystem for SSD Netbooks?

            Thanks both!

            Think I'm Okay with the noatime setup - simply typing that onto the list of options (a daft question but can it be anywhere on that line?) within fstab.

            Think I'l try one thing at a time first and get the noatime option working first but, at the risk of sounding a bit thick, where would I put the tmpfs entries please?

            ian

            Comment


              #7
              Re: Best Filesystem for SSD Netbooks?

              I am glad it helped! The tmpfs entries also go in /etc/fstab, but please try one thing at a time, as you said. I read at least two bug reports in launchpad regarding tmpfs in karmic, perhaps because of the introduction of upstart ... (and it is clearly not working for me as I posted above).

              Comment


                #8
                Re: Best Filesystem for SSD Netbooks?

                I'm in the course of installing Karmic now. Basically 9.04 experienced a crash which appears to have corrupted the file-system on the 8gb SDHC card.

                On re-reading this, I'm clear on the noatime option, but should I turn off the journal too? If so, is it possible to turn it off on a pre-installed system? Or won't it matter so long as I've using noatime.

                Thanks

                Ian

                Comment


                  #9
                  Re: Best Filesystem for SSD Netbooks?

                  Ian,

                  It can be disabled in ext4
                  http://kernelnewbies.org/Ext4
                  http://david.wragg.org/blog/2009/06/...sing-ext4.html

                  But I think data integrity is too important to give away, so I always use journaling. Noatime eliminates useless writes, no-journaling would eliminate very important writes (IMHO). SSD's are more prone to spontaneous (electronic) data corruption (I'll try to find a link later, it was discussed in linux.com recently).

                  Gotta run now!

                  Comment


                    #10
                    Re: Best Filesystem for SSD Netbooks?

                    Hi again

                    More info on data corruption, in this wonderful article:
                    http://www.linux-mag.com/cache/7590/1.html

                    I force a fsck every 3 days using this command
                    http://linux.die.net/man/8/tune2fs

                    The fsck on the 8gb ssd adds only 5 seconds to the boot procedure every 3 days, and a huge amount of piece of mind

                    Otherwise, even low end SSDs have so fast seek times that are a pleasure to use (that is, except the very very early, very crappy models like the one on early EEEPC's).

                    Cheers!
                    Leo

                    Comment


                      #11
                      Re: Best Filesystem for SSD Netbooks?

                      That was an interesting read Leo!

                      There was also another article there which covered, amongst other things, the noatime option.

                      I got the impression from that that there was mileage in using it on the root partition, where in normal use (eg loading applications) the system would be simply accessing files and needlessly recording them. It was felt that this might be of less use in /home where there are grounds for wishing to retain time access information.

                      Would be interested to learn your thoughts on that one.

                      All the best
                      ian

                      Comment


                        #12
                        Re: Best Filesystem for SSD Netbooks?

                        Thanks, I am flattered you care about my opinion 8) I think we should use noatime everywhere. As far as I can say, atime is a bad idea to begin with. Applications that need to lock files, should use a lock. Applications that need to know when something was _read_, should store that info.

                        In practice, only mutt (an obscure mail program) seems to depend on atime:
                        http://thunk.org/tytso/blog/2009/03/...atimerelatime/

                        In that same article, you can see the great speedup you get by just using noatime. Keep in mind that that article is written not by someone playing by ear like me, but one of the most respected filesystem hackers (father of ext4 afaik).

                        As an aside, I never use a separate home partition in SSD's, well, because I only have had small SSD's, and it is really hard not to waste same precious space if you split / and /home. But there is no one size fits all on partitioning, partially because you may have other media (SDHC, thumbdrives, etc) to store larger files ...

                        Comment


                          #13
                          Re: Best Filesystem for SSD Netbooks?

                          Hi again Leo

                          On this Acer I have found a separate home partition (well, it is on the SDHC in the left-hand slot) at least gives me a fighting chance of recovery in the event that the Acer suspends or hibernates at any time, which invariably seems to corrupt the data on the SDHC That is a right royal PITA I can tell you.

                          When I get home I will set it up. I was only able to do a quick reinstall this morning. Should I see a huge difference?

                          Interestingly my initial appraisal was that, unlike my laptop where the bootup in karmic is quicker than in jaunty, with the netbook it seems slower.

                          Finally, what do you think might happen if I set up my laptop to use noatime?

                          Thanks for the patience!

                          ian

                          Comment


                            #14
                            Re: Best Filesystem for SSD Netbooks?javascript:surroundText('[quote]',%20'[/quo

                            Ah, sorry, now I re-read the original post, I had forgotten. The SDHC is a lot slower than the SSD, so you _don't want to run all these little small files in /home to be read/written all time to be stored in the SDHC.

                            Here is what I would do:

                            Code:
                            SSD:
                            /        ext4,noatime   6 Gb (or 7)
                            /home   ext4,noatime   2 Gb (or 1)
                            
                            SDHC:
                            swap    1 Gb (same as RAM)
                            /data    ext4, noatime  7 Gb (make it be owned by the user, put music, videos, etc)
                            Rationale: you home will be plenty for text and config files, and your machine MUCH faster. The swap should accommodate accidental hibernation, and the SDHC is more than fast enough for multimedia playback

                            One more thing: Karmic is much faster in my 3 machines (2 netbooks and 1 64bit AMD X3 desktop).

                            Comment


                              #15
                              Re: Best Filesystem for SSD Netbooks?

                              That's an interesting setup.

                              When the netbook arrived with linpus on it it had everything on the everything on the SSD plus a swap partition and the SSD card was simply an expansion disk.

                              So far as my wifes netbook (which is already up and running) there are some photos in the home drive and in the documents folder there is the princely total of 4 documents! It's basically used for online, email, (even that is imap with gmail) and viewing the photos on occasions. I suspect sticking the home partition on the (slower) SDHC is not ideal from a performance perspective, although the convenience of being able to take it out and copy the data on my laptop is good. Especially so that in the past any attempt to suspend or hibernate the netbook (any point given the boot times in any event?) would result in corruption of the SDHC. On delivery the SDHC card was FAT 32 - I converted it to ext2. Could that have contributed I wonder and if so ought Ext4 to be an improvement?

                              Seems to work well, now i've done the elevator=noop tweak and that which is needed to make the right SD slot hot-pluggable. Webcam works now I have installed the backports package so pretty much all is well.

                              Thanks for your advice on this. I haven't done the tmpfs trick, at least as yet- my wife would rather I didn't mess with it now it works - which is a fair point I think.

                              All the best

                              Ian

                              Comment

                              Working...
                              X