Why doesn't "Pre-allocate disk space for all files" work as expected?

Windows specific questions, problems.
Post Reply
saywhat

Why doesn't "Pre-allocate disk space for all files" work as expected?

Post by saywhat »

I have "Pre-allocate disk space for all files" enabled. If I download a torrent that has several files in it but when I add it I only select, say, one file for download and I then later tick more files to be downloaded the added disk space is not allocated.

So for example I could download a 100GB multi-file torrent, tick just one 2GB file to be downloaded when I first add the torrent (which I think is allocated properly) and then later tick the other 98GB of files which aren't allocated any disk space, so when I check the file system it appears I have 98GB free which I really don't because it will gradually get filled with the remaining files being downloaded.

This is a problem for me because I am critically low on storage and I can't do anything about that just now so I regularly get into the situation where Qbittorrent starts giving errors because it's run out of disk space.

So why doesn't  "Pre-allocate disk space for all files" appear to do what it says? And anyway why isn't Qbittorrent smart enough to pause everything when it doees run out of disk space?
AntiGod666

Re: Why doesn't "Pre-allocate disk space for all files" work as expected?

Post by AntiGod666 »

I believe the torrent has to begin to download before the space is pre-allocated. If 0% of the file has downloaded then the space is not yet reserved.
Birb

Re: Why doesn't "Pre-allocate disk space for all files" work as expected?

Post by Birb »

I think the current pre-allocation method is pretty crap. This has been an issue ever since I moved to qBittorrent from uTorrent.

Right now pre-allocation works only when the first piece for a file is received. This doesn't matter much on fast torrents as all files will receive their first piece pretty quick. But on slow torrents (or big torrents with lots of files) it's a big issue. The whole point of pre-allocation is to make all files on disk as contiguous as possible and to reserve all needed space to prevent running out of it mid-download.

The uTorrent (as for versions 3.3.x at least) way of pre-allocation was the best imo:

1. On a torrent added as paused nothing happens.
2. When the torrent is started for the first time ALL files selected for download are pre-allocated.
3. As additional files are selected for download, if the torrent is running, they are pre-allocated on the spot.
4. If additional files are selected for download on a paused torrent, said files are to be pre-allocated the next time the torrent is started.

This way space is reserved as soon as files are to be downloaded (all files selected for a running torrent) and it makes impossible to run out of space when a torrent is running. If you don't have the space you'll find out as soon as you click "start".
Post Reply