Does Transmission Support the Use of Sparse Files?

Ask for help and report issues not specific to either the Mac OS X or GTK+ versions of Transmission
Post Reply
Renara
Posts: 38
Joined: Wed Feb 10, 2010 8:38 am

Does Transmission Support the Use of Sparse Files?

Post by Renara »

As the title says, I'm interested in whether or not Transmission supports the use of sparse files? I'm running Transmission as a headless daemon on Linux on an ext4 volume, it's a NAS I'm running on so it's not the most powerful machine, and I notice that when adding large torrents Transmission hangs for a long time while the torrent's file(s) are created, which suggests they may be getting written out in full before Transmission actually starts writing pieces into place.

Can anyone confirm if Transmission uses sparse files on file-systems that support them, and if it does, are there any settings I can use to control its behaviour?
blacke4dawn
Posts: 552
Joined: Sun Dec 13, 2009 10:44 pm

Re: Does Transmission Support the Use of Sparse Files?

Post by blacke4dawn »

Not sure if it uses or can use sparse files but I'm sure this is related to the preallocation setting:

Code: Select all

preallocation: Number (0 = Off, 1 = Fast, 2 = Full (slower but reduces disk fragmentation), default = 1)
From my own experience my installation doesn't create any files until it has actually received something from said torrent, and only for the actual file (and necessary dirs of course) that the data belonged to.
rb07
Posts: 1400
Joined: Sun Aug 24, 2008 3:14 am

Re: Does Transmission Support the Use of Sparse Files?

Post by rb07 »

Yes it does, if the underlying OS, and file system, supports them.

The setting shown by black4dawn is actually 1 for sparse files, called "Fast" for obvious reasons, and 2 is a file creation followed by filling it with zeroes. Both create the "full" file, i.e. when it is created you see the size as the complete file, even if sparse files don't actually reserve the space until it is used.
Renara
Posts: 38
Joined: Wed Feb 10, 2010 8:38 am

Re: Does Transmission Support the Use of Sparse Files?

Post by Renara »

Thanks for the replies! In that case I may need to do some more head-scratching till I figure out why Transmission slows down so much when a new torrent is added; it doesn't really interfere much (lasts about a minute tops), I might have a fidget with some other settings to see if maybe I just have too many torrents running at once, though it's not like Transmission is eating up all my CPU or anything.
Post Reply