Torrent Invites! Buy, Trade, Sell Or Find Free Invites, For EVERY Private Tracker! HDBits.org, BTN, PTP, MTV, Empornium, Orpheus, Bibliotik, RED, IPT, TL, PHD etc!



Results 1 to 3 of 3
Like Tree10Likes
  • 10 Post By Ronin21

Thread: Piece Size Guide

  1. #1
    Donor
    Ronin21's Avatar
    Reputation Points
    139211
    Reputation Power
    100
    Join Date
    Apr 2014
    Posts
    2,450
    Time Online
    207 d 15 h 10 m
    Avg. Time Online
    1 h 21 m
    Mentioned
    916 Post(s)
    Quoted
    560 Post(s)
    Liked
    3610 times
    Feedbacks
    135 (100%)

    Piece Size Guide

    As a reference to making new .torrent files with proper piece size, here are the information which we can choose the best piece size based on it.

    Info: Hide
    Before I can tell you what piece sizes are and how to choose them I must first explain how torrenting works. Torrenting uses P2P (peer to peer) which allows users to share files with each other.Torrenting is smart because if someone wants to share a 300GB pack and your seedbox only has a 100GB slot you couldn't download the full file and the whole system would break. This is where pieces come in, they thought of a scenario similar to that and decided it would be best to divide the torrent up into pieces so that you could download 100GB of that 300GB torrent and still be able to seed your 100GB; but only your 100GB because that is all the pieces you have.

    What piece sizes are

    So piece sizes are basically a fraction of a torrent. They did this so that you could download part of a torrent. (refer to scenario above)

    Piece size is the bit that can make a torrent seeded on a home connection scale well, or make even the best seeded torrent bog down. At its heart, it’s how big each piece is that is checked, and distributed, but also how much data you discard for a hash-fail. 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 peers connection for overhead.

    It’s a delicate balance, that is not easily found. Small pieces make it less susceptible to poisoning attacks (as practiced by MediaDefender, among others) 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 will be telling connected peers about pieces you have just got more often.

    After a number of years toying around, the optimum number of pieces seems to be between 1200 and 2200. Most torrent creators will only allow piece-sizes in multiples of 16kb, so you should, with few exceptions, find a size that fits in that range. A 700Mb torrent should be 512Kb pieces (giving 1400 total) and similarly, 350Mb would be better with 256kb. A 4.5Gb torrent would have 2,250 pieces, roughly, with a 2Mb piece-size. Or 1,125 with 4Mb. Either way would be fine, but 256kb pieces would mean 17,500+ pieces, and is too many.


    The benefit of using smaller/larger pieces

    Depending on how small/large you decide to decide to make your pieces depends on how many fractions you want your torrent to be in.

    Small pieces: Hide
    small pieces are less then 1MB, the benefit to small pieces is that if you lose a piece it is much less to download in order to get it back. This also means that more people could download more pieces and the torrent will have people downloading pieces faster since more people have them and you 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 lots of people.

    the bad thing about small pieces is that the more pieces you have the more resources it takes 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. (so for small torrents use smaller pieces and for bigger torrents use bigger pieces.)


    Big pieces: Hide
    The benefit of bigger pieces is that it uses less 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 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 torrents then you could lose the speeds and the torrent.


    Example: Show

    If you use a small piece size like 256kb on a big torrent and are transferring at gigabit speeds it will use more resources, probably also effect performance. but once you get to 2mb piece sizes and larger, i dont think it will have any effect on resources or performance, then the only thing making you use a bigger piece size will be the limit on size of .torrent file

    a large piece size like 16 mb or large will actually make worse performance for your torrent client like described, but also the swarm. you must also think about how there are slow peers in the swarm. you can get stuck transferring a 16mb+ piece size to some slow peers for a pretty long time, and that will slow piece propagation throughout the entire swarm

    i run rtorrent on a seedbox with 5 THOUSAND torrents, about 5 or so pushing high speeds at atime. the box pushing near 100mbit or more most of the time, without any problems. low cpu load averages, and about 2-3 GBs of ram taken up. i use 256mb piece size on stuff under 1GB, 512mb piece sizes on torrent around 1-3 GBs, 1mb on DVDR sized releases, and 2MB on everything bigger(nothing over about 30 GBs tho)

    no one should ever be using a 16MB piece size in my opinion....but with large torrents over like 400GB you must because many trackers wont allow (shouldn't allow) you to upload .torrent file over 1mb

    so lets assume we leave 100kb of space for the list of files and whatnot in .torrent. the piece hashes is a list of 20-byte SHA-1 hashes for each peace, so thats about 46000 pieces we can store in torrent. doing the division to keep the .torrent under 1 MB:

    1 mb piece size = max of about 45 GB torrent
    4 mb piece size = max of 180 GBs
    8 mb piece size = max of 360 GBs

    these are approximates, since it largely also depends on the number of files. if it is a large pack with rars, the file list can take up a large amount of space in the .torrent file, and if it is a few really big files, then the file list may be much smaller and only take up less than 10kB of space. with a small file list, an 8 mb piece size could create .torrent for lil over 400 GBs and still be around 1 mb .torrent, but with a very large file list, the file list itself can take up so much space that you end up using 32 mb piece size and still have it close to 1mb. i have even seen cases where the files list itself is over 1mb, and in that situation people are forced to unrar stuff, or split it up into multiple torrents


    FAQ: Hide
    I'm curious, if I have a torrent with a single file, why not use 16MB piece size?
    maybe I'm missing something, but it seems like bigger piece size shouldn't be an issue?
    also, what if you have a torrent less than 16MB and set the piece size to 16Mb wouldn't everyone have the whole file in one piece?


    just... no.

    that will cripple the whole bittorrent protocol. bittorrent works by multiple peers each sharing with multiple other people at once. this works by sending pieces out, and being able to send different pieces out at the same time to different people. can't really do that with 1 piece >_<

    bigger piece sizes ARE an issue. they cause bad performance. ideal, you dont want to go over like a 4mb piece size(and for something small as 16mb be using a 256kb piece size), but we are forced to go bigger because of the limit on .torrent upload.


    Conclusion/Short story: Hide
    The size of the torrent file, the amount of RAM and CPU used and the waste of bandwidth point towards a big piece size. Taking into account the difficulty to get the first pieces, that size decreases.

    All in all, a torrent should have around 1000-1500 pieces, to get a reasonably small torrent file and an efficient client and swarm download.

    On the other hand, too large pieces (4 MB and larger) can slow down piece distribution, as a single piece will have 256 or more 16 kB "blocks", which are the actual smallest transmission units in the bittorent protocol. That will lead to rather large "transmission-in-progress" data amounts (unfinished pieces) for each client. One should consider very carefully before creating piece sizes over 1 MB even for large torrents.

    Many pieces is good, few pieces is good too. Too many pieces is resource wasting and too few pieces is swarm/peering/speed waste !

    Generally for private trackers, around <2000 pieces is fine for any given torrent. And based on this point here is the reference

    2 MiB piece size for torrents up to 1.5 GiB
    4 MiB piece size for torrents up to 6 GiB
    8 MiB piece size for torrents up to 24 GiB
    16 MiB piece size for torrents exceeding 24GiB

    This is very suitable for quick peers with seedboxes and fast pre's on tracker like AlphaRatio.

    Other situwation: Hide
    For sake of referencing

    On most private trackers you want to not go beyond 5000 or 10000 pieces for single torrent maximum. So you might want to adjust your piece size accordingly. Kinda public recommendation for many private trackers, to be around 2000 pieces and based on this value, we may say

    Files up to 50MiB: 32KiB piece size
    Files 50MiB to 150MiB: 64KiB piece size
    Files 150MiB to 350MiB: 128KiB piece size
    Files 350MiB to 512MiB: 256KiB piece size
    Files 512MiB to 1.0GiB: 512KiB piece size
    Files 1.0GiB to 2.0GiB: 1MiB piece size
    Files 2.0GiB to 4.0GiB: 2MiB piece size
    Files 4.0GiB to 8.0GiB: 4MiB piece size
    Files 8.0GiB to 16.0GiB: 8MiB piece size
    Files 16.0GiB and up: 16MiB piece size, and larger at your discretion.

    for public trackers, or not caring about your memory/cpu usage, it would go a bit higher but not more than around 10000-20000 pieces and the torrent file would be still small considering many files included in the torrent which listing them could take more size of the .torrent file. The reference in this are would be

    <1GB you can use any smaller piece size than 1 MB
    1GB-10GB you can use 1MB
    10GB-30GB you can use 2MB
    30GB-75GB you can use 4MB
    75GB+ you can use 8MB
    200GB+ 16MB

    If you are confused about <1GB files then here you go

    Releases up to 50MiB: 32KiB piece size
    Releases : 50MB to 149Mb: 64KiB piece size
    Releases : 150MB to 349Mb: 128KiB piece size
    Releases : 350MB to 511MB: 256KiB piece size
    Releases : 512MB to 999MB: 512KiB piece size
    Releases : 1.0 GB to 2.0GB: 1024KiB piece size
    jimmy7, Insideman, Laxus and 7 others like this.

  2. #2
    User cagriu1905's Avatar
    Reputation Points
    934
    Reputation Power
    36
    Join Date
    Dec 2016
    Posts
    68
    Time Online
    5 d 12 h 10 m
    Avg. Time Online
    2 m
    Mentioned
    15 Post(s)
    Quoted
    6 Post(s)
    Liked
    31 times
    Feedbacks
    7 (100%)
    thank you nice guide

  3. #3
    Power User
    virgo1's Avatar
    Reputation Points
    4416
    Reputation Power
    73
    Join Date
    Feb 2017
    Posts
    212
    Time Online
    29 d 23 h 50 m
    Avg. Time Online
    16 m
    Mentioned
    55 Post(s)
    Quoted
    69 Post(s)
    Liked
    183 times
    Feedbacks
    6 (100%)
    Nicely explained. Thanks.


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •