Android and defragmentation

Status
Not open for further replies.

Coleman

Ars Legatus Legionis
16,790
Subscriptor
So...since it's possible to plug an external hard disk into an Android device, and this is a very real thing that I think some people are doing because of Shield tablet + Plex, plugging a spinning disk in for extended periods.

I realized I wasn't sure if Android bothered with any kind of disk maintenance routines. Does anyone know if it does? It seems like something that you might want if you are in that situation.
 

Hat Monster

Ars Legatus Legionis
47,680
Subscriptor
You can install a terminal emulator and run most standard Linux disk maintenance utilities. Might require root, but if you're "this sort of user", you already have that.

In most cases, Android as a media player handles large files which really don't give a shit about linear fragmentation as their read rate is very slow and sequential.
 

Coleman

Ars Legatus Legionis
16,790
Subscriptor
[url=http:/civis/viewtopic.php?p=31550205#p31550205:3fslfg6x said:
Hat Monster[/url]":3fslfg6x]You can install a terminal emulator and run most standard Linux disk maintenance utilities. Might require root, but if you're "this sort of user", you already have that.

In most cases, Android as a media player handles large files which really don't give a shit about linear fragmentation as their read rate is very slow and sequential.

Actually, I was referring to Plex media server running on the Shield. There are suggestions in the Plex forums that there is a lot of write activity possible beyond just the caching for transcode operations (meta-data storage and other database activity related to supporting the media server). So I feel like the possibility of fragmentation on a HDD is not something that can be ignored.
 

Hat Monster

Ars Legatus Legionis
47,680
Subscriptor
So be the guinea pig!

Run your Shield for a while with the drive, then analyse how fragmented it is on a desktop OS. My gut feeling is "not very". Yes, there are writes, but they're to database backing files. Databases don't give a flying fuck about fragmentation as they're randomly accessed anyway.

I've studied filesystems for years and years (and co-developed a fragmentation resistant filesystem in 1996, FR-FFS, a development of the Amiga's DC-FFS) and one thing stands up against all other things as causing fragmentation, which is concurrent, slow, streaming writes. Plex servers don't do this. Furthermore, modern (modern is relative, this technique is over twenty years old) filesystems are smart enough to fill larger blocks if the write is not small.

Go test. I think you don't need to worry, but you're welcome to disprove me at any time.
 
Status
Not open for further replies.