Active Topics

 


Reply
Thread Tools
Posts: 32 | Thanked: 22 times | Joined on Jul 2012 @ Germany
#1
I have a simple question. Is defragemtation of /home/user/MyDocs recommended?
 
Posts: 44 | Thanked: 38 times | Joined on Mar 2010 @ Germany
#2
It's not a hard disk. So why would you want to defragment it? There's no need to.
 

The Following 5 Users Say Thank You to BigLebowski For This Useful Post:
Posts: 986 | Thanked: 1,526 times | Joined on Jul 2010
#3
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.
__________________
~ teleshoes ~

Last edited by wolke; 2013-08-07 at 06:58.
 

The Following 5 Users Say Thank You to wolke For This Useful Post:
Posts: 1,808 | Thanked: 4,272 times | Joined on Feb 2011 @ Germany
#4
+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.
 

The Following 2 Users Say Thank You to reinob For This Useful Post:
Posts: 31 | Thanked: 6 times | Joined on Aug 2012
#5
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 ?
 
Posts: 986 | Thanked: 1,526 times | Joined on Jul 2010
#6
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.}
__________________
~ teleshoes ~
 
Posts: 329 | Thanked: 422 times | Joined on Feb 2011 @ derpton
#7
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.
 
Posts: 986 | Thanked: 1,526 times | Joined on Jul 2010
#8
heh calling the n9 kernel not too recent is SERIOUS understatement. im pretty sure the discard flag happened around the same time
__________________
~ teleshoes ~
 
Posts: 986 | Thanked: 1,526 times | Joined on Jul 2010
#9
important thing to note here, though, is that the flash memory will last longer than your phone will, on average.
__________________
~ teleshoes ~
 

The Following User Says Thank You to wolke For This Useful Post:
Posts: 31 | Thanked: 31 times | Joined on Jan 2013 @ USA
#10
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.
 

The Following User Says Thank You to eccerr0r For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 21:31.