Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    Disappearing space in optification experiment

    Reply
    GameboyRMH | # 1 | 2010-12-06, 14:54 | Report

    Today I tried optifying /usr/lib/microb-engine. I moved it and symlinked it. This made the browser run at a crawl so I deleted the symlink and moved the directory back. The browser was back to normal. But suddenly I now had 20MB less free rootfs space

    That can't be caused by the files being de-sparsed, that's almost the size of the files themselves! Why such a difference? When I look at the breakdown with Storage Usage I don't see anything different, but df-h confirms the loss of free space.

    I'm going to restore my rootfs and /opt from a backup I made on Saturday, but still, WTF!?

    Edit | Forward | Quote | Quick Reply | Thanks

     
    GameboyRMH | # 2 | 2010-12-06, 15:15 | Report

    update: just out of curiosity I rebooted (was on a record 15 days uptime and was going for more) and the space went back to what it was before. Weird...

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Rob1n | # 3 | 2010-12-06, 15:39 | Report

    Did you check whether the space had actually freed up after you originally moved the directory? The filesystem can't properly delete a file if it's still open (it deletes the directory entry, but the file data must be kept), so I'd guess the free space never actually dropped, and when you moved them back it had to create a new copy. A reboot would close the files and allow the deletion to complete, freeing up the space again.

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 2 Users Say Thank You to Rob1n For This Useful Post:
    GameboyRMH, Helmuth

     
    javispedro | # 4 | 2010-12-06, 15:42 | Report

    I can see three reasons for this:
    - Packages in the base image or installed via the application manager while doing a SSU are more compressed than the rest of files. (Same reason upgrading Maemo with apt-get instead of H-A-M uses slightly more space after the procedure). This however only accounts for a little %.
    - UBIFS might have troubles calculating free space until a GC run or a reboot. JFFS2 at least had.
    - There's a browserd process that keeps the microb files in use. This means that even if you unlink (delete) them, they will be kept in the disk as long as the browserd process keeps using them. Even if you overwrite the file names with another set of files, the original file contents will remain on disk until browserd dies (and of course, browserd died when you rebooted).

    Edit | Forward | Quote | Quick Reply | Thanks

     
    GameboyRMH | # 5 | 2010-12-06, 15:48 | Report

    Originally Posted by Rob1n View Post
    Did you check whether the space had actually freed up after you originally moved the directory? The filesystem can't properly delete a file if it's still open (it deletes the directory entry, but the file data must be kept), so I'd guess the free space never actually dropped, and when you moved them back it had to create a new copy. A reboot would close the files and allow the deletion to complete, freeing up the space again.
    Yeah I think this is what happened, the browserd process must have been using the files.

    Edit | Forward | Quote | Quick Reply | Thanks

     
vBulletin® Version 3.8.8
Normal Logout