![]() |
Defrag of Mydocs?
I have a simple question. Is defragemtation of /home/user/MyDocs recommended?
|
Re: Defrag of Mydocs?
It's not a hard disk. So why would you want to defragment it? There's no need to.
|
Re: Defrag of Mydocs?
mydocs is on the emmc, which is nand-based flash memory. flash memory, unlike hard disks, doesnt have seeking, so there is no {very little} penalty for distributing your data across the 'disk'.
EDIT: whoops, what he said. EDIT: also, when i say 'very little', i mean that it is very rarely convenient to have files' data neatly organized on the disk, e.g.: for un-deleting files. there is absolutely no performance gain whatsoever for defragging flash ever. |
Re: Defrag of Mydocs?
+1 to @BigLebowski and @wolke above.
Also, consider that with flash memory you (the OS) have no control as to where blocks are physically stored, so by "defragmenting" you will be merely hopelessly reshuffling the data and making the wear leveling controller suffer for no reason. |
Re: Defrag of Mydocs?
I got another question:
I am a new N9 owner and recently also switched to Linux on my desktop. as i own a SSD i put a simple script in my cron folder to ftrim my SSD daily. also i read that android will offer the support for this command in the next version. is something similar necessary for our N9 ? so does the device tell the controller when a file was deleted and the controller can mark the space as available or will the filesystem only be notified ? |
Re: Defrag of Mydocs?
first, i recommend you not worry about TRIMing, on your desktop or your mobile. its unlikely there would be measurable improvements in performance, and there is a decent chance that there would be a measurable drop in performance.
i dunno if the n9 emmc is smart enough to know what to do with the information about deleted blocks; depends on the version of the controller. if it DOES, and if you insist on worrying about discarding blocks, you could format MyDocs with ext4, and see if the kernel on the n9 supports the 'discard' mount option. {note that its disabled by default because it hurts performance a little; the benefits might outweigh the cost, but probably not.} |
Re: Defrag of Mydocs?
Even not too recent kernels support trimming, you need to the discard flag to your mount options, like for example:
UUID=xxx / ext4 errors=remount-ro,noatime,nodiratime,discard 0 1 noatime and nodiratime are also advisable: they won't write access time of files and directories, thus further reducing wear on the nand cells. |
Re: Defrag of Mydocs?
heh calling the n9 kernel not too recent is SERIOUS understatement. im pretty sure the discard flag happened around the same time
|
Re: Defrag of Mydocs?
important thing to note here, though, is that the flash memory will last longer than your phone will, on average.
|
Re: Defrag of Mydocs?
There is some benefit for defragging flash - If you keep all your empty space and constantly changing space defragmented, the number of erases and erase block rewrites would be decreased. This would increase speed a bit. However this depends on how much you use the flash. The best way to defragment? Though a regular defragmenting program works, this may add a lot of wear to the media. You could also defragment the old fashioned way, just copy everything to another media, erase the media completely, and copy everything back.
Does the eMMC on the n900 support trim? It's not just the kernel that needs to support it. |
All times are GMT. The time now is 06:07. |
vBulletin® Version 3.8.8