Slashdot Mirror


Oracle Adds Data-integrity Code To Linux Kernel

jazir1979 writes "ZDNet is reporting that Oracle has added code to the Linux kernel for ensuring data integrity. The code has been developed in partnership with Emulex and was recently accepted into the 2.6.27 kernel release." According to the article, "The code adds metadata to data at rest or in transit, to monitor whether that data has been corrupted. It helps make sure that I/O operations are valid by looking at that metadata — which acts as verification information — exchanged during data transmissions."

32 of 53 comments (clear)

  1. Dumb question... by geminidomino · · Score: 3, Insightful

    How badly does this affect performance?

    1. Re:Dumb question... by afidel · · Score: 3, Informative

      It doesn't matter much. This patch adds T10-DIF which basically brings minicomputer level data integrity to the commodity computer market. It adds about 1.54% to data storage requirements (8 bytes of ECC per 512 byte block, just like the AS/400) and some small amount of code at the OS and APP layers to check the CRC's. With Oracle I would imagine this might actually INCREASE performance for the most fault intolerant environments since it wouldn't need to do a read after write if the storage system acknowledged a successful T-10 DIF block save.

      --
      There are 4 boxes to use in the defense of liberty: soap, ballot, jury, ammo. Use in that order. Starting now.
    2. Re:Dumb question... by afidel · · Score: 1

      Hmm, on second thought after doing some more research it MIGHT matter:
      CRC is somewhat expensive. 200-300 MB/s on a modern CPU looking into ways to optimize
      SSE4 will have a CRC instruction (any poly)
      linky(pdf)

      Not sure what he means by CPU there, if he means core then it's not so bad (other than freaking expensive per core Oracle licensing), if that's per processor then that's very bad. Guess I might only be able to implement this on the new Shanghai beast we got last week or a new Corei7 Xeon system we will probably get next year once they are available.

      --
      There are 4 boxes to use in the defense of liberty: soap, ballot, jury, ammo. Use in that order. Starting now.
  2. Re:Yay for Linux! by morgan_greywolf · · Score: 3, Insightful

    The Year of Linux on the Database? Nah, that happened a long time ago.

  3. Oracle submitted a 2nd patch by aztektum · · Score: 3, Funny

    It adds a 2nd layer of metadata that is used to verify the first layer of metadata wasn't corrupted so you can be EXTRA confident that your original data was actually handled correctly.

    --
    :: aztek ::
    No sig for you!!
  4. Then Oracle submitted a 3rd patch by butalearner · · Score: 2, Funny

    It pre-corrects a future corruption in the as-yet-unimplemented third layer of metadata. Kernel developers have decided to add the third layer and accept the patch on the grounds that the corruption might still have occurred even if Oracle hadn't said anything.

  5. Terribly old news by zdzichu · · Score: 3, Informative

    Block integrity patches were discussed in excellent article on LWN in July 2008. Kernel 2.6.27 was released in October 2008. This is old news.

    --
    :wq
    1. Re:Terribly old news by XaXXon · · Score: 4, Insightful

      Oh my god! Not news from October. That was going on two months ago. Everyone knows everything that happened two months ago. What were the editors thinking? Fire them immediately. Let's all go to digg or reddit or myspace where they don't do things like post things that are almost two months old. PANIC PANIC PANIC!!!

      Wow, just let other people read it and go on about your business not caring.

    2. Re:Terribly old news by Nick+Ives · · Score: 4, Informative

      That LWN writeup is far better too though, TFA is terrible. LWN makes it clear that this adds device checksum support, i.e. if your SATA drive supports adding checksum data to blocks this patch will enable that functionality.

      --
      Nick
    3. Re:Terribly old news by commanderfoxtrot · · Score: 1

      Thanks for that summary. It's been many years now since I kept up with the kernel changelogs and articles... the kernel now Just Works.

      --
      http://blog.grcm.net/
  6. Congratulations... Oracle by HighOrbit · · Score: 2, Insightful

    You've invented the Checksum

    On a more serious note (yes I did RTFA), somebody please explain where this fits. Other than network or disk errors (which generally already have error detection schemes), I'm not sure what the target problem is that this is supposed to fix. The article says "the code helps maintain integrity as data moves from application to database, and from Linux operating system to disk storage", that it checks I/O operations, and that "code contribution includes generic support for data integrity at the block and file-system layers". That's still not clear what they think the problem is. Don't most of the modern file systems already check data operations?

  7. erasure codes by two+basket+skinner · · Score: 1

    link is skim on details. any word if there is error correction or is it just detection? what does this add that say erasure coding (reed-solomon) lacks?

    1. Re:erasure codes by Detritus · · Score: 1

      It's just error detection. Recovery is handled at a higher level.

      --
      Mea navis aericumbens anguillis abundat
  8. Re:Congratulations... Oracle by setagllib · · Score: 2, Informative

    I don't know where it fits either, but ZFS and eventually BTRFS actually have checksums at the block level, and can heal over corrupted blocks using redundant copies whose checksums do work. That alone is enough reason to use ZFS for a file server, but similar improvements could be made inside the Linux stack without a new filesystem on top. However ZFS' reliability also comes from copy-on-write updates which is not trivially installed into an existing filesystem.

    --
    Sam ty sig.
  9. Re:Security??? by Workaphobia · · Score: 4, Insightful

    Integrity is a security principle, and that is the sense that they're using the word in the summary. It's pretty much the only definition of the word that makes sense in a computing context. More precisely, we're talking about confidence that the data stored in the system is the same as the data retrieved at a later time. The only difference between this and a more cryptographic sense of the word is that this doesn't attempt to guard against malicious attacks if an adversary had offline access to the disk. (Or so I presume, having not RTFA'd).

    --
    Evidently, the key to understanding recursion is to begin by understanding recursion. The rest is easy.
  10. vs a journaled fs? by pak9rabid · · Score: 1

    Excuse me if this is a dumb question, but how does this differ from the journal in many existing filesystems?

    1. Re:vs a journaled fs? by JohnFluxx · · Score: 2, Informative

      The purpose of a journal is to make sure that operations either happen or they don't happen - i.e. you don't leave the filesystem in some half way state if the power goes out.

      It doesn't verify the actual data written or anything.

    2. Re:vs a journaled fs? by pak9rabid · · Score: 1

      Ah ok...thanks for clearing that up.

  11. Re:Congratulations... Oracle by phantomcircuit · · Score: 2

    I'm not certain but it appears to be checksumming data while it is moving around the kernel after a write or read call is made.

    Seems like something that should be handled in hardware with ECC, but what do I know.

  12. Looks like it is T10 SCSI by phantomcircuit · · Score: 1

    ... whatever that means.

    Info

  13. Re:Congratulations... Oracle by scheme · · Score: 3, Informative

    I'm not certain but it appears to be checksumming data while it is moving around the kernel after a write or read call is made.

    Seems like something that should be handled in hardware with ECC, but what do I know.

    Kernel bugs can cause data to get corrupted and hardware ECC won't correct that. Likewise with transfers from memory to disk. Ultimately it'll need to be a hardware/software thing but the software portion is needed as well.

    --
    "When you sit with a nice girl for two hours, it seems like two minutes. When you sit on a hot stove for two minutes, it
  14. Re:Data integrity is great and all... by jabuzz · · Score: 1

    I have been running it since well, when it became available for Linux and I had to hand patch and compile my own kernel. Not once have I had any file system corruption in the intervening years. Well apart from when a disk developed bad sectors, but that is hardly the fault of XFS...

    Some time ago (I forget when) I did have a few files truncated to zero on a kernel panic usually a failed restore, and usually my bookmarks. Not had that in six or seven years now though.

    They have even fixed the issue where you needed scads of RAM to check a large file system. My only beef with XFS is that you cannot size it smaller.

  15. Re:Congratulations... Oracle by afidel · · Score: 1

    This is industry standard checksumming to ensure end to end data integrity from the disk to the storage system to the HBA to the OS to the app. I'm quite stoked for this since my SAN vendor (Xiotech) has the first system to support the standard (Emprise 5000/7000) and we have Oracle 10/11G already in our environment.

    --
    There are 4 boxes to use in the defense of liberty: soap, ballot, jury, ammo. Use in that order. Starting now.
  16. Re:Congratulations... Oracle by MikeBabcock · · Score: 1

    RAM errors.

    Spontaneous bit flips change data in transit.

    It also helps against errors in kernel code or malicious data injection attacks

    --
    - Michael T. Babcock (Yes, I blog)
  17. Re:Congratulations... Oracle by Detritus · · Score: 2, Informative

    One of the problems that this is supposed to detect is blocks getting written to the wrong place or being read from the wrong place. I think it's one of those rare problems that stops being quite so rare when you have huge amounts of data stored on cheap hardware.

    --
    Mea navis aericumbens anguillis abundat
  18. Re:Ooh wow! by Timothy+Brownawell · · Score: 1

    Maybe linux will break .8% of the market with this groundbreaking advance.. *snicker*

    Windows 37.4% (268), Linux 34.6% (248), Unknown 19.2% (138), Macintosh 7.6% (55), FreeBSD 0.5% (4), Solaris 0.4% (3).

    I think it depends on which market you're talking about.

  19. Re:Congratulations... Oracle by Detritus · · Score: 1

    ECC usually covers specific paths or devices, but it doesn't give you an end-to-end integrity check. A similar situation happens with IP packets. You can disable packet checksums if you like to live dangerously. Then, all you need is a bit of noise or a hardware problem to silently corrupt data that flows over the network.

    --
    Mea navis aericumbens anguillis abundat
  20. Re:Congratulations... Oracle by illumin8 · · Score: 1

    The article says "the code helps maintain integrity as data moves from application to database, and from Linux operating system to disk storage", that it checks I/O operations, and that "code contribution includes generic support for data integrity at the block and file-system layers". That's still not clear what they think the problem is. Don't most of the modern file systems already check data operations?

    You might not understand why we need it, but trust me, it is needed. Not all storage device drivers are created equally, and some will happily report to the kernel that the write operation was successful even if it wasn't, and you end up with corrupted data. When Oracle operates on a trusted environment like Solaris on Sparc, this type of integrity is built in to the operating system and it's not necessary to do a read after write to verify the data was written correctly. On Linux, and other untrusted operating systems where this doesn't happen, Oracle has to do a read after write to make sure the data was written correctly. This slows things down quite a bit.

    --
    "When the president does it, that means it's not illegal." - Richard M. Nixon
  21. Re:Congratulations... Oracle by Xabraxas · · Score: 1

    You might not understand why we need it, but trust me, it is needed. Not all storage device drivers are created equally, and some will happily report to the kernel that the write operation was successful even if it wasn't, and you end up with corrupted data. When Oracle operates on a trusted environment like Solaris on Sparc, this type of integrity is built in to the operating system and it's not necessary to do a read after write to verify the data was written correctly. On Linux, and other untrusted operating systems where this doesn't happen, Oracle has to do a read after write to make sure the data was written correctly. This slows things down quite a bit.

    The article I read about this states that Linux is the first operating system to implement these standards, T10 PIM and DIE. It says that they are looking to implement the same technology in Windows, Solaris, and other Unixes. It also states that this is implemented both in hardware and software. In what way does this differ from Solaris/SPARC's data integrity implementation?

    --
    Time makes more converts than reason
  22. Re:Congratulations... Oracle by illumin8 · · Score: 1

    The article I read about this states that Linux is the first operating system to implement these standards, T10 PIM and DIE. It says that they are looking to implement the same technology in Windows, Solaris, and other Unixes. It also states that this is implemented both in hardware and software. In what way does this differ from Solaris/SPARC's data integrity implementation?

    It may not be the same implementation, but Solaris on Sparc has built in ECC across all data paths, including CPU -> memory, CPU -> I/O, etc. I believe it is a combination of hardware and software (kernel) that does this.

    The article, I believe, is talking about implementing the same level of software checking in x86 versions of the operating systems mentioned.

    --
    "When the president does it, that means it's not illegal." - Richard M. Nixon
  23. Re:Congratulations... Oracle by setagllib · · Score: 1

    Below the filesystem. ZFS can export zvols, which are just block devices whose storage maps on to ZFS blocks. They get checksumming and copy-on-write semantics, even snapshotting, and yet still support any filesystem on top, a whole partition table, a virtual machine disk, or whatever. They're just block devices, but they still get most of the reliability advantages of ZFS itself.

    It's not as efficient as storing a ZFS filesystem which can track its used/free space and feed that in to the reliability systems, but if you want reliability, you get a lot of it for zero effort.

    What I'm saying is that, as far as I understand, the same volume reliability features can be implemented for Linux without a new filesystem. You'd just have a new integration of existing RAID and block mapping features, plus block level checksumming and copy-on-write (feeding in to the device mapper). Even RAID-Z could be implemented in this way without needing a new filesystem. You can already run Linux filesystems over iSCSI to a zvol, so why not just implement the zvol directly in Linux?

    --
    Sam ty sig.
  24. Re:Congratulations... Oracle by ToasterMonkey · · Score: 1

    SAN vendor (Xiotech) has the first system to support the standard (Emprise 5000/7000

    Which standard?

    Has Xiotech added Emulex HBAs to the compatibility matrix for those systems yet? ROFL.