Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

9/13/2020 (1) Tutorials - Optimizing a torrent for best upload speed/resource usage.

ce usage. How to set the right piece size value. | Team OS : Your Only De…

 Introduction  Rules  How to Upload?  What is Ratio?  Your Seed Bonus  Upgrade Account

TeamOS
Your Only Destination to Custom OS

Forums Others Tutorials

 Optimizing a torrent for best upload speed/resource


Tutorials
usage. How to set the right piece size value.
 Cyler ·  Jul 27, 2020

Watch

Cyler
Super Moderator

Jul 27, 2020   #1

Setting the right Piece Size for optimal speed/resource balance

How torrents work


Before we dive in we need to understand how the torrent system works. Torrenting is a P2P (Peer to Peer)
method of sharing les with other users. The smartness and uniqueness of the torrent method is that it
allows for a le to be split into pieces and the initial seed can transmit di erent pieces to di erent users and
then have the users transit the pieces they have to each other and so the upload speed becomes the
collective upload bandwidth of everyone in the swarm.

You can see how this works in the diagram below.

https://www.teamos-hkrg.com/threads/optimizing-a-torrent-for-best-upload-speed-resource-usage-how-to-set-the-right-piece-size-value.130251/ 1/14
9/13/2020 (1) Tutorials - Optimizing a torrent for best upload speed/resource usage. How to set the right piece size value. | Team OS : Your Only De…

In the beginning, the Initial seed breaks the le in 3 pieces (A, B, C) and then transmits 1 piece to each client
Once the clients have a complete piece, they then start exchanging pieces with the other users.
This is why torrents start slow but speed up with more users joining. In the end, all peers will have all the
pieces.

....

https://www.teamos-hkrg.com/threads/optimizing-a-torrent-for-best-upload-speed-resource-usage-how-to-set-the-right-piece-size-value.130251/ 2/14
9/13/2020 (1) Tutorials - Optimizing a torrent for best upload speed/resource usage. How to set the right piece size value. | Team OS : Your Only De…

So piece sizes are basically a fraction of a torrent or the complete le.


Of course, the torrents we host here don't just split into 3 pieces, actually, the truth is that sometimes they
split into the thousands. Piece size is the setting that can make a torrent seeded on a home connection scale
well, or make even the best-seeded torrent bog down.

At its heart, the issue is, how big each piece should be. Each piece has a speci c amount of the torrents data,
but also data about hash/fail and tracking control. Make the pieces too few and big, and it can be very hard
for a peer to get started, too many small pieces will use more of a peer's connection for overhead.

It’s a delicate balance, that is not easily found. Small pieces make it less susceptible to poisoning attacks and
errors and will help a torrent deal with sudden increases in peers, by making it easy to get a piece or two to
trade. However, keeping track of who has what piece requires bandwidth, and small pieces mean that you
and the swarm will be telling connected peers about pieces you have just got more often.

1
 The benefit of using smaller/larger pieces
H     

One thing that you may not know is that each time we transmit a piece we don't only upload pure torrent
data but also extra information such as Hash data and tra c/handshake data. That's why if you have a
bandwidth monitor you will see di erent upload/download values from your monitor and from the torrent
client. Most clients dont show (or rather have it out of sight) the additional bandwidth used (as well as retries),
and that is why size optimization does improve performance.

Small pieces
We will consider as "small pieces" those that are less than 1MB. The bene t to small pieces is that if you lose a
piece (hush errors/bad connections) it is much less cost to redownload. This also means that more people
could download more pieces and the torrent will have people downloading pieces faster at the beginning
since more people have them, and a new peer could get one piece from multiple people faster. The bad part
is that the more peers that you are connected to the more bandwidth you are going to use because you have
to connect to a lot more people and keep track of a lot more pieces. That is more so the case for the original
seeder.

The bad thing about small pieces is that the more pieces you have the more resources they take up. If you
have a big torrent with small pieces then think of all the resources it will take up. 10GB torrent with piece sizes
of 256kb would have 40960 pieces which would take up 1280MB of ram.

Big pieces
The bene t of bigger pieces is that they use fewer resources. You should use bigger pieces (1MB and above)

for bigger torrents. As you saw in the example earlier smaller pieces used on a big torrent will use up a lot of

https://www.teamos-hkrg.com/threads/optimizing-a-torrent-for-best-upload-speed-resource-usage-how-to-set-the-right-piece-size-value.130251/ 3/14
9/13/2020 (1) Tutorials - Optimizing a torrent for best upload speed/resource usage. How to set the right piece size value. | Team OS : Your Only De…

resources. Bigger pieces also mean that the torrent will last longer. If you have 1 seeder on a 10GB torrent
that has been divided into 4MB, each piece will take longer to download but a seeder will be able to seed a
bigger piece (256kb up compared to 4MB up). Once you have a lot of seeders big piece torrents can have
extreme speeds because each peer could supply you with a big chunk of the torrent.

Sadly the big piece torrent is a double edge blade, If multiple are downloading only parts of the torrent (not
complete it) then you could lose the speeds and the torrent. If errors happen during the download they will
take longer to redownload. The torrent will be slower at the start. If we use too big of a size like 16mb or
larger, it will actually perform worse for both your client and the swarm. We need to remember that not all
peers have the same internet speeds. If we use too big of size we may get stack feeding a 16MB piece to a
small peer for a really long time and that will slow piece propagation throughout the entire swarm.
Remember that at the start each client gets a di erent piece so the slow one will slow down everyone else.

Forums
Conclusion/Short
What's New
story
Post Thread Search

There is no right and wrong, no DOs or DONTs. only appropriate and adjusted.
There are some considerations for the uploaders that are based on
How many torrents they plan or already seed on their PCs for memory/CPU usage?
How "popular" those torrents now or going to be later, How many users will probably stay to help seed?
Small piece size makes torrent start faster but not peak after several peers become seeders.
Big piece size consumes less ram/CPU/bandwidth (for those that host multiple torrents)
Too many pieces are resource wasting and too few pieces are swarm/peering/speed waste!

So what do we do?
A shart guide (but not absolute) would be

50MB to 300MB: 128KB piece size


300MB to 600MB: 256KB piece size
600MB to 1.0GB: 512KB piece size
1.0GB to 2.0GB: 1MB piece size
2.0GB to 4.0GB: 2MB piece size
4.0GiB to 8.0GiB: 4MB piece size
8.0GiB to 16.0+GiB 8MB piece size

Keep in mind that those are set for Personal computer or a home NAS doing the seeding. If we use a seedbox
you can have a bit higher values as most seedboxes o er good upload speeds.

Please keep in mind that the above list is not absolute and as I said many other factors should be considered.

Also as internet speeds increase, it blurs the lines so some experimentation might be in need.

https://www.teamos-hkrg.com/threads/optimizing-a-torrent-for-best-upload-speed-resource-usage-how-to-set-the-right-piece-size-value.130251/ 4/14
9/13/2020 (1) Tutorials - Optimizing a torrent for best upload speed/resource usage. How to set the right piece size value. | Team OS : Your Only De…

Open to any questions and I hope the guide is of some help.

Edit:
After the suggestion of @skip1 (Thank you), I added 3 screenshots from the most used torrent clients so you
know where to nd the size option.
In general, for most clients, it should be in the torrent creation options.
Tixati
Utorrent
Qbittorrent

Last edited: Jul 28, 2020

Nobody is perfect. I'm nobody.

https://www.teamos-hkrg.com/threads/optimizing-a-torrent-for-best-upload-speed-resource-usage-how-to-set-the-right-piece-size-value.130251/ 5/14
9/13/2020 (1) Tutorials - Optimizing a torrent for best upload speed/resource usage. How to set the right piece size value. | Team OS : Your Only De…

Report  Like

reddove, Mahi Babu, rogersoniq and 20 others

Yash Dedhia
Uploader Veri ed Member

Jul 27, 2020   #2

Thats how one explains.. thankyou for a great post buddy.. i would like to get such posts from you on Team
OS

Report  Like  Reply

Imran Hashmi, jerry_xristos, skip1 and 4 others

hamabe
: It's that time again : 。゚・ (>﹏<) ・゚。 Veri ed Member

Jul 27, 2020   #3

great post indeed, needs to be stickied


most releases here are using torrents

while disregarding hit and run tactics,


some users aren't bothered to con gure their BT clients hence the low ratio

Report  Like  Reply

Imran Hashmi, skip1, x7razor and 2 others

SlavkoPejic
Veri ed Member

Jul 27, 2020   #4

Thanks very nice post !!!


Report  Like  Reply

https://www.teamos-hkrg.com/threads/optimizing-a-torrent-for-best-upload-speed-resource-usage-how-to-set-the-right-piece-size-value.130251/ 6/14
9/13/2020 (1) Tutorials - Optimizing a torrent for best upload speed/resource usage. How to set the right piece size value. | Team OS : Your Only De…

Imran Hashmi, jerry_xristos, skip1 and 3 others

Nigrin
*GIFTED UPLOADER* Uploader Veri ed Member

Jul 27, 2020   #5

@Cyler thank you ... but this falls under the "Books" section!

Thanks to all the Seeders who sel essly spend their time and resources to make Torrent work
properly and without whom this TeamOS forum would not be what it is. Stay part of the Team
because: "You are TeamOS"!!

Report  Like  Reply

reddove, starforce, Imran Hashmi and 4 others

skip1
Uploader Veri ed Member

Jul 27, 2020   #6

Great post @Cyler


For con guring clients like qBittorrent are these the values that should be adjusted? And is it possible to
adjust not only on a global settings but per torrent basis?

Screenshot
Captured with Lightshot
prnt.sc

As always great share, maybe a screenshot or two on the most widely used clients could be added to show
users where to adjust accordingly per this post.
Best,
Skip

Report  Like  Reply

reddove, Imran Hashmi, x7razor and 2 others

Cyler 
Super Moderator

https://www.teamos-hkrg.com/threads/optimizing-a-torrent-for-best-upload-speed-resource-usage-how-to-set-the-right-piece-size-value.130251/ 7/14
9/13/2020 (1) Tutorials - Optimizing a torrent for best upload speed/resource usage. How to set the right piece size value. | Team OS : Your Only De…

Jul 27, 2020   #7

skip1 said: 

Great post @Cyler


For con guring clients like qBittorrent are these the values that should be adjusted? And is it possible to adjust not only
on a global settings but per torrent basis?

Screenshot
Captured with Lightshot
prnt.sc Click to expand...

Qbit

Torrent is a protocol and protocol essentially means "we all agree, if we want to be called torrent clients, to
follow the rules of torrenting", and so most torrent clients have the common option in almost the same
location... In this case at the torrent creation menu. Note: You can of course set it on auto, but I always adjust
it for the tracker I use and the No of seeds I concurrently have.

Below you can see Tixati and Utorrent. It's always in the Torrent creation dialog.

https://www.teamos-hkrg.com/threads/optimizing-a-torrent-for-best-upload-speed-resource-usage-how-to-set-the-right-piece-size-value.130251/ 8/14
9/13/2020 (1) Tutorials - Optimizing a torrent for best upload speed/resource usage. How to set the right piece size value. | Team OS : Your Only De…

Last edited: Jul 27, 2020

https://www.teamos-hkrg.com/threads/optimizing-a-torrent-for-best-upload-speed-resource-usage-how-to-set-the-right-piece-size-value.130251/ 9/14
9/13/2020 (1) Tutorials - Optimizing a torrent for best upload speed/resource usage. How to set the right piece size value. | Team OS : Your Only De…

Nobody is perfect. I'm nobody.

Report  Like  Reply

SlavkoPejic, hamabe, x7razor and 3 others

skip1
Uploader Veri ed Member

Jul 27, 2020   #8

Cyler said: 

https://www.teamos-hkrg.com/threads/optimizing-a-torrent-for-best-upload-speed-resource-usage-how-to-set-the-right-piece-size-value.130251/ 10/14
9/13/2020 (1) Tutorials - Optimizing a torrent for best upload speed/resource usage. How to set the right piece size value. | Team OS : Your Only De…

Qbit

Click to expand...

Report  Like  Reply

Thank you buddy, will most certainly apply in future.


hamabe, x7razor, Cyler and 2 others

akash609
Registered User

Jul 27, 2020   #9

Nice and Compact .....the one expected from you


Made it a sticked post if possible @Cyler

Report  Like  Reply

SlavkoPejic, hamabe, x7razor and 1 other person

leperdu
Veri ed Member

Jul 28, 2020   #10

Thank you for these ideas


Report  Like  Reply

SlavkoPejic and Cyler


https://www.teamos-hkrg.com/threads/optimizing-a-torrent-for-best-upload-speed-resource-usage-how-to-set-the-right-piece-size-value.130251/ 11/14
9/13/2020 (1) Tutorials - Optimizing a torrent for best upload speed/resource usage. How to set the right piece size value. | Team OS : Your Only De…

choli
C Registered User

Jul 28, 2020   #11

Finally... proper explanation..


Although the only thing that i know is some client will rejects .torrent that above 1MB...

Well done...

Report  Like  Reply

SlavkoPejic and Cyler

Cyler
Super Moderator

Jul 28, 2020   #12

choli said: 

Finally... proper explanation..


Although the only thing that i know is some client will rejects .torrent that above 1MB...

Well done...

First of all, thank you for your comment, it means a lot. As for the 1mb chunk, that was true back in 2010 my
friend, so unless one uses a client that old it won't have any issues. None of the main clients I tested
(Utorrent, Qbit, Transmission, Libtorrent, and Tixati) had any issues for up to 16Mb size.

The only limit I know, based on torrent protocol, is the number of total pieces that cant exceed 65536 (8bit)
and so as an example if one has a 30 Gb le and set the piece size to 64kb there will be 468.750 pieces
generated and so it would break down the torrent protocol completely. Some clients like Qbit and Tixati have
that number set to 1.000.000 but even with that you cant be safe from stupidity. About a month ago I saw a
300Gb torrent with piece size set to 256k... The only torrent client that can handle such an extreme number of
pieces is Transmission (at least in Linux) which is why I use it on my server.

https://www.teamos-hkrg.com/threads/optimizing-a-torrent-for-best-upload-speed-resource-usage-how-to-set-the-right-piece-size-value.130251/ 12/14
9/13/2020 (1) Tutorials - Optimizing a torrent for best upload speed/resource usage. How to set the right piece size value. | Team OS : Your Only De…

Report  Like  Reply

Nobody is perfect. I'm nobody.


SlavkoPejic and choli

                  

Write your reply...

 Attach les  Preview  Post reply

Similar threads

Locked Cannot download torrent from this site!


Aug 25, 2020

suggestion: torrent windows iso naming


Aug 19, 2020

Torrent Truecaller Latest Release 2020/2021 Premium Gold Apk - Torrent [Single thread]
Aug 10, 2020

Instructions for what to do if .torrent le download is blocked in Google Chrome or MS Edge


Aug 6, 2020

Locked Add a Warning When Someone Creates a Torrent-Chunks Way Too Small for Ginormous File Size
Jul 26 2020

Share:        

Forums Others Tutorials

INTERESTING FOR YOU 

https://www.teamos-hkrg.com/threads/optimizing-a-torrent-for-best-upload-speed-resource-usage-how-to-set-the-right-piece-size-value.130251/ 13/14
9/13/2020 (1) Tutorials - Optimizing a torrent for best upload speed/resource usage. How to set the right piece size value. | Team OS : Your Only De…

Antidot pentru vasele Ca să crească potența Minunat! Varicele se Dacă aveți papiloame
înfundate - tratament de 15 ori în 3 minute dizolvă în 2 zile dacă pe gât și axile - citiți

 Dark Theme 

Contact us Terms and rules Privacy policy Help Home 

https://www.teamos-hkrg.com/threads/optimizing-a-torrent-for-best-upload-speed-resource-usage-how-to-set-the-right-piece-size-value.130251/ 14/14

You might also like