[Solved] Created a new seed, but optimise alignment didn't work

Windows specific questions, problems.
Post Reply
tixati

[Solved] Created a new seed, but optimise alignment didn't work

Post by tixati »

Hey, all.

I'm using v4.4.5, 64bit created a new torrent for a folder containing multiple files and enabled the "Optimize Alignment" option, then download the torrent from bitcomet (latest version, 2.0, also support optimise alignment) but found that the actual status of the torrent was "Not Optimize Alignment".

As shown in the picture, under the check button there is a option "Align to piece boundary for files larger than ** ", unit KiB, The default value is "disabled", I used the default [disabled] here at the time.

Optimise alignment not taken effect, Is it because of this?

is there any way to make it work?

Thank you!

Image
Last edited by tixati on Sun Jul 16, 2023 4:49 am, edited 1 time in total.
tixati

Re: Created a new seed, but optimise alignment didn't work

Post by tixati »

After multi tests, the solution was found.

Even though the option "optimize alignment" is on, but when the option "align to …… larger than" set to the default [disabled], the function will not take effect;

When the option "align to …… larger than" set to 1 KiB, it will filter out the files smaller than 1KiB in the folder when create seed, At this point, only parts of files are aligned, so the status seen in Bitcomet is "Not Piece-Aligned".

✅ When the option is set to 0 KiB, all files in the folder will be aligned, At this point, the status seen in Bitcomet is "Piece-Aligned".

Image
tixati

Re: [Solved] Created a new seed, but optimise alignment didn't work

Post by tixati »

sorry for my english, I am not native speaker

optimise alignment

For a torrent that contains multiple files, the size of one of the files D may not be an integer multiple of the piece size set.

For example, if piece size set to 256KB, but the last piece of file D may only be 100KB, and the remaining 156KB is not filled, ❎ if the torrent was not enabled "optimize alignment" when created, the remaining 156KB will be filled by another file E. Therefore, when only certain files in the torrent (say D) are selected for download, It will stuck at 99.x%, because a part of a piece in file D is on file E.

✅ If this setting is enabled, a blank file will be automatically generated when creating a new torrent to fill in the rest of a piece of D, so that multiple files D, E, do not have to share common piece, which can solve the problem of being stuck at 99.x% and improve download performance.

Image

-------------------------
-------------------------
Related:
Padding files and extended file attributes
Padding files
Padding files are synthetic files inserted into the file list to let the following file start at a piece boundary.
https://www.bittorrent.org/beps/bep_0047.html
----------------
How to Align File to Piece Boundary?
If the last chunk of a file is too small to be a full piece, than we add a padding file into the torrent that is the exact size of the remaining unoccupied space in the piece, just behind this file. In this last piece, there will be only contents from this file and the padding file and also the padding file will end at the exact end of the piece thus being aligned to the piece boundary. This way every initial file is separately contained in different sets of pieces and no piece will overlap two of the initial files. Also, the “99.9% finished” problem will be gone.
http://wiki.bitcomet.com/align_file_to_piece_boundary
----------------
Does the last piece of torrent correspond to the last piece of last file?
https://stackoverflow.com/questions/519 ... -last-file
----------------
Since bittorrent downloads pieces, and pieces may span multiple files. Otherwise when you de-select some files you may still get the first and last bit of it (because it overlaps pieces that you need for other files).
……
There are more elegant ways of implementing pad files, and I believe libtorrent and uTorrent do it better. For instance, you can consolidate all pad files in a (hidden) directory when creating the torrent. uTorrent will also put partial pad files in its partfile.
https://stackoverflow.com/questions/319 ... ding-files
----------------
torrent creator options explained?
https://www.reddit.com/r/qBittorrent/co ... explained/
Post Reply