New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre-allocation is a lie! #10282

libTorrentUser opened this Issue Feb 11, 2019 · 2 comments


None yet
3 participants
Copy link

libTorrentUser commented Feb 11, 2019

On Windows, if the user does not have the required permissions, file pre-allocation will fail. It will pretend it worked, but what you get is just a sparse file. You may not notice the resulting fragmentation if you are using SSD, but switch to a HDD and download a torrent with more than one file and you will see your disk crying for help.

I believe no body noticed it yet because most Windows users always use admin accounts. The fact that Windows explorer shows a make believe file size for sparse files does not help. Only if the (non-admin) user clicks on properties he will see the actual allocated size.

This is not qBittorrent problem (well, kind of is), but a libTorrent problem. I already tried warn them there

I hope that issue will be reopened, but the final solution may require some little tweaks on qBittorrent too. AFTER libTorrent fixes the problem, I vote for a simple permission check and a message box warning the user that due to lack of permissions, pre-allocation will take a little longer for him (because Windows will fill the allocated space with zeros). No UAC, no nothing.


This comment has been minimized.

Copy link

libTorrentUser commented Feb 12, 2019

Guys, I talked to the libTorrent guys, did a couple more tests using libTorrent 1.2 and I can confirm libTorrent is working as expected, as you can see here:

It seems to be a qBittorrent only problem. So, here is I can reproduce the problem:

  • machine: Windows 7 64
  • qBitTorrent 4.1.5 extracted from the installer using 7-zip.
  • execute qBittorent a guest user in portable mode. I done it using `runas.exe ... "qBitTorrent.exe --portable"
  • pre-allocate files option checked
  • added a multiple file torrent (total size 1TB, each file is around 6.5GB) and selected only one of them.

When the download starts, this is what the Windows Explorer file properties dialog show:
size: 6,47 GB (6.952.040.592 bytes)
size on disk: 2,24 GB (2.412.642.304 bytes)


This comment has been minimized.

Copy link

verbal666 commented Feb 16, 2019

I can confirm "file pre allocation" fails... on W10/64... i'm in use to flag always this config, but, after seeing it's not working, i deflagged it... flagging it, file are not allocated, it's as config is not set, files are loaded seconds by seconds when torrent get it, NOT BEFORE as it should be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment