Skip to main content
BlogLinuxRFT: “ubd=mmap” experimental config option

RFT: “ubd=mmap” experimental config option

Request for Testing!

I would appreciate it if some of you would test a new option which changes the way UML writes to your filesystem files, and post your experiences here.

Normally, UML uses the standard open/close read/write library calls. The problem with this is that it duplicates data in the host’s page cache, and impacts over all disk i/o performance. The new option maps the filesystem file directly into the page cache, so it eliminates duplicate copies of pages and wasted page cache…

You’ll notice a new “Experimental Option” in the Edit Config Profile page. To turn it on, Enable ubd=mmap, save, and reboot. You should notice it in dmesg under kernel options. (dmesg | grep mmap)

Once we’ve had a bunch of successful reports, I’ll consider enabling this for everyone.

[color=darkred][b]WARNING:[/b][/color][/size] I do NOT recommend just anyone turning this on yet. There is always a chance of data loss with a maturing feature such as this. Jeff Dike fixed the last known bug in ubd=mmap last month which ate filesystems over 4GB (so that would be a good test), so use this option with caution. There haven’t been any reports of mmap related failure on the UML mailing lists, but this isn’t a widely known option.

The current version (in the 2.4.24 kernels) has worked fine for me with mmap enabled, but your mileage may vary.

Thanks,
-Chris


Comments (7)

  1. Author Photo

    I’m game. 🙂

    I just rebooted my linode with it enabled. I do nightly backups, so I am not overly concerned. Here’s hoping for the best..

  2. Author Photo

    That went badly.

    From dmesg:

    EXT3-fs error (device ubd(98,32)) in ext3_reserve_inode_write: IO failure
    EXT3-fs error (device ubd(98,32)) in ext3_orphan_add: IO failure
    attempt to access beyond end of device
    62:20: rw=0, want=1086378492, limit=525312
    EXT3-fs error (device ubd(98,32)): ext3_get_inode_loc: unable to read inode block – inode=2507, block=808465534
    EXT3-fs error (device ubd(98,32)) in ext3_reserve_inode_write: IO failure
    attempt to access beyond end of device
    62:20: rw=0, want=1086378492, limit=525312
    EXT3-fs error (device ubd(98,32)): ext3_get_inode_loc: unable to read inode block – inode=2507, block=808465534
    EXT3-fs error (device ubd(98,32)) in ext3_reserve_inode_write: IO failure
    attempt to access beyond end of device
    62:20: rw=0, want=1086378492, limit=525312
    EXT3-fs error (device ubd(98,32)): ext3_get_inode_loc: unable to read inode block – inode=2507, block=808465534
    EXT3-fs error (device ubd(98,32)) in ext3_reserve_inode_write: IO failure

    Over and over and over, and I/O failures on files. I’m turning it back off..

  3. Author Photo

    Well then. Let me gather the info and send that along to the list.

    -Chris

  4. Author Photo

    My var filesystem was pretty goofed up, but I managed to fix it, and am up and running again without mmap.

  5. Author Photo

    Thanks for giving it a try. Glad it wasn’t too hosed… I guess there is our answer about mmap. It’s hungry for filesystems!

    I’ve posted a msg to uml-user, so we’ll see what comes of it. I also removed the option from the config edit page…

    Thanks,
    -Chris

  6. Author Photo

    Not a problem, I was prepared if it had gone worse. I saw your email, I’ll be interested to see if they can track down the problem.. It’s an interesting option that I’d like to use on my non-linode UML’s as well.

  7. Author Photo

    Sounds like Jeff knows what to look for (from #uml)…

    [code]13:05 < caker> jdike: anything else I can provide on the ubd=mmap corruption issue?
    13:33 < jdike> caker: I’ve seen problems, so I’ve got something to chase
    13:33 < jdike> caker: namely pages of zeros which shouldn’t be[/code]
    -Chris

Leave a Reply

Your email address will not be published. Required fields are marked *