Slashdot Mirror


Linux Gains Lossless File System

Anonymous Coward writes "An R&D affiliate of the world's largest telephone company has achieved a stable release of a new Linux file system said to improve reliability over conventional Linux file systems, and offer performance advantages over Solaris's UFS file system. NILFS 1.0 (new implementation of a log-structured file system) is available now from NTT Labs (Nippon Telegraph and Telephone's Cyber Space Laboratories)."

34 of 331 comments (clear)

  1. Bloat? by shadowknot · · Score: 3, Insightful

    Please correct me if I'm wrong here but wouldn't a log that is only appended to and never overwritten cause a massive ammount of bloat after a period of prolonged use?

    1. Re:Bloat? by Ayanami+Rei · · Score: 3, Interesting

      There is a "cleaner" that is on the TODO list.
      Of course, you can delete files and re-use the space. But the performance slows down greatly once you start filling in "holes" left in the log after wrapping to the end of the allocated area. (A similar situation to database where you might want to compact, vacuum, condense, etc. a table).

      --
      THIS THING CAN TURN ON A DIME, MACROSSZERO STYLE ALSO FUCK BETA, ~NYORON
    2. Re:Bloat? by Skye16 · · Score: 4, Funny

      Scratch my previous post, I actually read the article. My bad :)

    3. Re:Bloat? by ivan256 · · Score: 5, Informative

      I wrote a (unfortunatly, closed source) filesystem that was remarkably similar to this once. Generally these types of filesystems are used when you're constantly writing new data. You're going to be eating the space anyway, but you want the reliability of syncronous writes with the performance of asyncronous cached writes. Reading from these filesystems is incredibly slow in comparison.

      The version I wrote took advantage of the client's bursty IO pattern and used the slow periods to offload the data to an ext2 filesystem on a seperate disk. Hopefully your system memory was large enough that the offload to the secondary filesystem happened without any disk reads. Once that was done, the older sections of log could be re-used.... But only once the disk filled up and wrapped back to the beginning, because you want to keep your writes (essentially... There's other timing tricks you can play to get more speed) sequential.

      There's been lots of research done on this method of write structuring. Look for papers on the "TRAIL" project (also closed source), for example.

    4. Re:Bloat? by Alien+Being · · Score: 5, Funny

      /. is a journaled website. We can't scratch your previous post. Years from now you will be able to come back and show your grandchildren how silly you were.

  2. New Improved? by TheRaven64 · · Score: 4, Insightful

    The article was a bit light on details. Perhaps someone could enlighten me as to exactly why this is better than existing log-structured filesystems, such as NetBSD's LFS.

    --
    I am TheRaven on Soylent News
    1. Re:New Improved? by Feyr · · Score: 4, Informative

      the why is dependent on your application,

      for common servers, or day-to-day use. it isn't

      but notice how this was developped by a telecom company? a log structured filesystem is perfect or even required, due to speed and integrity constraints (depending on the size of the network), when you're dealing with billing and monitoring data on a telecom network. you want something that's simple and extremely resistant to failures. a complete system crash (which never happen, short of nuking the box) should not result in any data loss, or the extreme minimum, and you should be able to recreate that data from somewhere else (eg, the other endpoint in a telephone network).

      a log structured filesystem allow this, the "head" is never over previous data in normal operation. you don't typically read the data back until the end of a cycle (whatever that cycle may be) or in a debugging condition. you simply append to the end. minimizing head movement, and thus increasing mtbf (replacing a disk in those things is costly)

      this is also extremely useful for logging to WORM media (write once, read many), for security logs mostly. you don't want a hacker to be able to remove them, no matter what they do

    2. Re:New Improved? by rpresser · · Score: 5, Funny

      Logs structures are suceptible to termites, carpenter ants, and various forms of rot.

      Even worse, when many logs are added together, the problems multiply.

  3. Horrible headline by Quasar1999 · · Score: 4, Insightful

    A lossless file system? Good lord... I most certainly hope all the exisiting file systems out there are not lossy. I have hundreds of gigabytes of data that I don't want to lose.

    Or is this filesystem somehow able to recover data once the hard drive crashes? That would be neat...

    --

    ---
    Programming is like sex... Make one mistake and support it the rest of your life.
    1. Re:Horrible headline by TheRaven64 · · Score: 5, Informative
      The title was written by a numpty. This is a log-structured filesystem. These systems have been around for ages. NetBSD has LFS (originally from 4.4BSD), and I believe Minix also had some form of log-structured filesystem.

      A log-structured filesystem doesn't modify existing files. Every time you write to the disk, you simply append some deltas. This gives very good write performance, but poor read performance (since almost all files will be fragmented, and the entire log for that file must be replayed to determine the current state of the file). To help alleviate this, most undergo a vacuuming process[1], whereby the log is replayed, and a set of contiguous files is written. This also frees space - something that is not normally done since deleting a file is done simply by writing something at the end of the log saying it was deleted. In addition to the good write performance, log-structured filesystems also have an intrinsic undo facility - you can always revert to an earlier disk state, up until the last time the drive was vacuumed.

      The snapshot facility is not particularly impressive. It's a feature intrinsic to log-structured filesystems, and also available in other filesystems (such as UFS2 on FreeBSD and XFS on Linux). The performance advantage claims must be taken with a grain of salt - write performance for log-structured filesystems is always close to the theoretical maximum of the disk, but this is at the expense of some disk space, and read speed (although LFS did beat UFS in several tests on NetBSD).

      [1] This is usually done in the background when there is little or no disk activity.

      --
      I am TheRaven on Soylent News
    2. Re:Horrible headline by addaon · · Score: 5, Insightful

      It should be said that "good write performance, bad read performance" is essentially the point, not a defect. It's easy these days to speed up reads a huge amount through caching; these days 100MB+ of UBC isn't rare. But when you have to write, you have to write (for reliability reasons); this can't be cached into memory, so it should be optimized for. The goal here is to make BOTH operations as fast as possible, though one is made fast at the disk layer and one is made fast above it.

      --

      I've had this sig for three days.
  4. So... by Juiblex · · Score: 5, Funny

    If it is lossless, I won't be able to store MPEG, XVid, JPEG and MP3 on it anymore? :(

    1. Re:So... by BottleCup · · Score: 3, Funny

      No, but you can use the soon to be released MILF 1.0 file system for your jpg and mpg needs.

      Now that's one filesystem I would like to fsck upon every boot(y) ;)

  5. Old news by Anonymous Coward · · Score: 5, Funny

    Websites with MILFS have been around for years.

    Oh, wait. NILFS. My bad.

    1. Re:Old news by SatanicPuppy · · Score: 4, Funny

      Well, we know it doesn't stand for nerds...

      (Sorry...Couldn't resist)

      --
      ad logicam Claiming a proposition is false because it was presented as the conclusion of a fallacious argument.
    2. Re:Old news by schon · · Score: 3, Funny

      Willow wasn't a nerd, she was a geek (geeks have social skills.)

      I can think of at least one Norwegian-ILF (Kristanna Loken.)

  6. Database Servers by mysqlrocks · · Score: 4, Insightful

    Log-structured filesystems write down all data in a continuous log-like format that is only appended to, never overwritten. The approach is said to reduce seek times, as well as minimizing the kind of data loss that occurs with conventional Linux filesystems.

    This sounds a lot like how database servers work. They keep both a log file and a database file. The log file is continuously written to and is only truncated when backups occur.

  7. The dreaded question by digitalgimpus · · Score: 3, Funny

    Will there be a Windows Driver?

    If there isn't, this has no chance on taking off. Consumers today want portability. They don't like lock-in. A linux exclusive format is lock-in.

    Create a good windows (and Mac OS) driver, and it's got massive potential.

    1. Re:The dreaded question by pesc · · Score: 3, Insightful

      Consumers today want portability. They don't like lock-in.
      That's unfortunately not true, which is proved by all the people using NTFS (or Office).

      --

      )9TSS
    2. Re:The dreaded question by reynaert · · Score: 3, Funny

      Will there be a Windows Driver? If there isn't, this has no chance on taking off.

      Yes, that's why I only use FAT filesystems on my Linux server.

  8. Stable? by theJML · · Score: 5, Informative
    I like how they say it's reached a stable release but if you look at the known bugs on the Project Home Page http://www.nilfs.org/ You'll see that:

    The system might hang under heavy load.

    The system hangs on a disk full condition.
    Aren't those kind of important to saying that something is stable?

    --
    -=JML=-
  9. Here's an overview for lazy people like me by Work+Account · · Score: 3, Informative

    NILFS is a log-structured file system developed for the Linux kernel 2.6. NILFS is an abbreviation of the New Implementation of a Log-structured File System. A log-structured file system has the characteristic that all file system data including metadata is written in a log-like format. Data is never overwritten, only appended in this file system. This greatly improves performance because there is little overhead regarding disk seeks. NILFS also has the following specific features:

            * Slick snapshots.
            * B-tree based file and inode management.
            * Immediate recovery after system crash.
            * 64-bit data structures; support many files, large files and disks.
            * Loadable kernel module; no recompilation of the kernel is required.

    --

    If you "get" pointers add me as a friend (116)!
  10. actual info about the fs by cowens · · Score: 4, Informative
  11. Excellent information retention by totallygeek · · Score: 4, Funny
    I installed this lossless file system. rm is now chmod 444. I have not been able to lose information since.

    Note: instead of modding this +1 funny, mod it +0.1 pathetic.

  12. Data is the new currency my friend by Work+Account · · Score: 3, Interesting

    Aside from gasoline and water, data is the most valuable thing in the world.

    Walmart's most prized possesion is their billion-billion-billion transaction customer sales database. They use it to find things like, among other things, men tend to buy beer and diapers at the time.

    With disks costing $1.00/GB or less these days, many people including myself simply DON'T delete data anymore. I keep all my original digital photos (in .tiff format) along with full-quality movies and all the games I've ever played back to Duke Nukem on 80x386 on a RAID array that's grown to nearly 2 terabytes.

    So yes, for many people, disk space is just something you keep adding to, like you'd move from a coupe to a sedan when you have kids and when you have that 6th kid you move to a minivan and if you happen to have 2 more, you get a cargo van when #8 comes along :) Same for HDDs

    --

    If you "get" pointers add me as a friend (116)!
    1. Re:Data is the new currency my friend by Old+Wolf · · Score: 4, Funny

      I keep all my original digital photos (in .tiff format) along with full-quality movies and all the games I've ever played back to Duke Nukem on 80x386 on a RAID array that's grown to nearly 2 terabytes.

      So, basically, you're going to keep Duke Nukem forever?

  13. There's no replacement for ext3fs yet for me... by davegaramond · · Score: 4, Insightful

    I'd looove to replace ext2/3 as my filesystem for years since it's not so fast and most distro don't include binary tree indexing for ext3 (so large dir is slow). Unfortunately I haven't been able to do so. Here are my requirements:

    1. Distro support. I don't want to have to compile my own kernel. The FS needs to be supported by the distro (Debian in this case). I want to be able to create root partition and RAID with the FS.

    2. ACL and extended attributes.

    3. extended inode attributes would be nice ("chattr +i" is handy sometimes).

    4. optionally I would like to be able to create large Bestcrypt partitions (e.g. 30GB) with that FS.

    5. fast large dir and small files performance (I have millions of small files on my desktop).

    6. no need to fsck or fast fsck (i.e. journalling or some other technique or whatever).

    7. disk quota!

    8. optionally, transparent compression and encryption will be a big plus point.

    9. Snapshots would be nice too, for consistent backups.

    10. Versioning is also very welcome.

    XFS: very close but it still has problems with #4. It also doesn't have undelete like ext2/ext3 (not that it's a requirement though).

    JFS: it just lacks many features.

    Reiser3: How's the quota support, still have to patch kernel everytime? Plus it doesn't have ACL.

    Reiser4: not ready yet.

    I might have to look at FreeBSD after all. Background fsck, hmm....

    1. Re:There's no replacement for ext3fs yet for me... by metamatic · · Score: 3, Funny

      Reiser3 works fine on Debian with no kernel patching required.

      It seems as if you're holding out for perfection, not willing to upgrade from ext3 to anything else unless you find The Perfect Filesystem. I think that's kinda silly; better to get 90% of what you need now, than to wait another 2-4 years, surely?

      --
      GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak
    2. Re:There's no replacement for ext3fs yet for me... by m50d · · Score: 3, Informative
      Reiser3: How's the quota support, still have to patch kernel everytime? Plus it doesn't have ACL.

      It does have ACL, and quota support is fine at least in gentoo kernels (can't check a vanilla one atm)

      --
      I am trolling
  14. Re:Shutdown versus power off by pesc · · Score: 4, Interesting

    Ever since journaling file systems became available I just started turning the power off to my computers (via a power strip) rather than going through the shutdown command.

    That's a very bad idea. Normally, journaling file systems only guarantee that the file/directory structure remains intact. It does not necessarily guarantee that the data in the files hit the disk. Also, your disk will probably have a cache that is lost when you remove power. Whatever is in the cache will also be lost.

    So your file system may be intact, but your practices will probably destroy data.

    --

    )9TSS
  15. Re:Needs a new name by chochos · · Score: 4, Funny

    NILF: Netserver I'd Like to fsck (but I don't need to anymore, apparently)

  16. HDFS (home-dir FS)? by Ramses0 · · Score: 4, Interesting

    I've had an idea kicking around for a while now... "HDFS / Home-Dir File System" ... I want a (s)low-performance, bloated, version controlled, roll-back featured, viewcvs.cgi enabled file system for my /home/rames (or at least /home/rames/documents).

    With FUSE it might even be possible for mere mortals like me.

    Basically, I very rarely push more around more than 100-200kb at a time of "my stuff" unless it's big OGG's or tgz's, etc. Mostly source files, documents, resume's, etc. In that case, I want to be able to go historical to any saved revision *at the file-system level*, kindof like "always on cvs / svn / (git?)" for certain directories. Then when I accidently nuke files or make mistakes or whatever, I can drag a slider in a GUI and "roll-back" my filesystem to a certain point in time and bring that saved state into the present.

    Performance is not an issue (at first), as I'm OK if my files take 3 seconds to save in vim or OpenOffice instead of 0.5 seconds. Space is not an issue because I don't generally revise Large(tm) files (and it would be pretty straightforward to have a MaxLimit size for any particular file). Maintenance would also be pretty straighforward: crontab "@daily dump revisions > 1 month". Include some special logic for "if a file is changing a lot, only snapshot versions every 5-10 minutes" and you could even handle some of the larger stuff like images without too much work.

    Having done quite a bit of reading of KernelTraffic (Hi Zack) and recently about GIT, maybe it's time to dust off some python and C and see what happens...

    --Robert

  17. Re:Shutdown versus power off by Marillion · · Score: 4, Funny
    Hard drives with voicecoil head positioning (some 99.99% of them sold in the past 10 years) will autopark on poweroff. The real risk is how much latency the os has between when an application saved it's data and when the buffers are flushed.

    Some applications keep files open for a long time: MySQL, gDBM-based apps, Squid. Most of those application implement their own mini-filesystems within a file optimised for task. These systems are supposed to preserve their integrity by journaling their modifications in case the underlying os doesn't.

    Switching off a computer because it has a journaling filesystem is like stopping a car by driving into a something because it has seat belts.

    --
    This is a boring sig
  18. Re:Shutdown versus power off by 0xABADC0DA · · Score: 3, Informative

    Close, but no cigar:

    1. It goes into the OS filesystem cache. After 5 seconds the modified data gets flushed to the disk (sometimes set to 30 sec).
    2. It is written to the hard drive. Here, it sits in the hard drive controller's on-board cache until the head arrives at the write point, which is a fraction of a second.
    3. It is written to disk.

    So it *can* happen that data is not written properly, but unlike the scary picture you paint it is extremely unlikely. Even if you just saved your data, just do a sync and you'll be fine turning the power off.