Opened 10 years ago

Closed 8 years ago

Last modified 8 years ago

#4137 closed Enhancement (fixed)

Choose piece size at torrent creation

Reported by: georg123 Owned by: jordan
Priority: Normal Milestone: 2.80
Component: Utils Version: 2.22
Severity: Normal Keywords: block, chunk, piece, size, torrent, patch
Cc:

Description

It would be great if there were an option of selecting piece size when creating a torrent, instead of it being only automatic.

Attachments (2)

0001-add-s-option-to-tranmission-create-supports-optional.patch (5.6 KB) - added by lav 8 years ago.
add -s option forces set custom piece size
check_piece.patch (1.6 KB) - added by lav 8 years ago.
Check for correct value of the piece size

Download all attachments as: .zip

Change History (20)

comment:1 Changed 10 years ago by livings124

  • Resolution set to wontfix
  • Status changed from new to closed

Sorry, but this is an unnecessary level of control. Transmission chooses the best size, factoring in file size and piece size.

comment:2 Changed 10 years ago by User294

  • Resolution wontfix deleted
  • Status changed from closed to reopened

I would be evil enough to reopen this. As for me this is what forces me to resort to mktorrent/buildtorrent sometimes. Sometimes I need to control this. Imagine that you can expect a severe corruption by some evildoers while you have large amount of data to seed. Now T would automatically choose a huge piece size for me. That's what I'm often calling as unrequested misfeature.

What's wrong? Once piece corrupt, you have to redownload it. The bigger piece means more redownload occurs. Actually the bigger part, the more efficient attacks could be made to prevent torrent data from spreading. I'm for example prefer 256 or at very most 512 kb pieces most of time, even if this leads to some metadata increase. In exchange this warrants that you will only redownload at most 512K if part corrupt, percent of metadata remains small compared to data but torrent becomes more robust even if someone attempts to sabotage it by sending corrupt data.

comment:3 Changed 10 years ago by livings124

  • Resolution set to wontfix
  • Status changed from reopened to closed

Transmission chooses the best size for all the criteria. This is not something most users need to control.

comment:4 Changed 10 years ago by georg123

Certain trackers, like rutracker, have a limit of 250KB for each .torrent you upload. A 50GB file amounts to a 500KB .torrent made in Transmission, thus making me unable to upload it onto that tracker. Had I the ability to choose piece size, I would be ably to shrink the .torrent file size, and successfully upload it onto this tracker.

comment:5 Changed 10 years ago by moujik

  • Milestone changed from None Set to 2.40
  • Resolution wontfix deleted
  • Status changed from closed to reopened
  • Summary changed from Choose Piece Size at Torrent Creation to Choose piece size at torrent creation
  • Version changed from 2.22 to 2.33+

Default options work well in usual situations, but sometimes smth. non-standard can happen :)
I agree with georg123, some trackers don't like big torrent files (e. g., > 250 KiB), so user needs to use other programs just for creating a single torrent file, which is not comfortable and can provoke that user to migrate from Transmission to other clients.
Why not to add a simple piece size selection option? (Another, even worse option is to prompt the user for torrent file size).
If you think it can be dangerous for average users, you can make some tab with advanced settings in Transmission. You can even implement this feature only in CLI version, to scare the newbies, but save us from the need to do the dirty tricks with other clients :)

comment:6 Changed 10 years ago by jordan

  • Milestone changed from 2.40 to None Set
  • Resolution set to fixed
  • Status changed from reopened to closed
  • Version changed from 2.33+ to 2.22

Please don't set milestones. As it happens, we're already frozen for 2.40.

comment:7 Changed 9 years ago by moujik

  • Keywords block chunk added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Manual chunk size selection option still not present in Transmission 2.50 (I've checked both GTK and CLI versions).

comment:8 Changed 9 years ago by livings124

  • Resolution set to wontfix
  • Status changed from reopened to closed

This was closed as a wontfix already.

comment:9 follow-up: Changed 9 years ago by x190

Why is this labeled a "wontfix"? It seems to be important for a segment of users and perhaps someone will produce a patch.

comment:10 Changed 9 years ago by tals

Agree with all comments standing for this implementation. It would be nice to have that option... By default transmission-create (without customer size length parameter) could decide the best size, factoring in file size and piece size. But advanced user could specify [e.g. -l --piece_size <piece_size>Mb, Kb] option to reduce *.torrent file size since some trackers have torrent file size limitations.

Thanks

comment:11 Changed 9 years ago by msoltyspl

One more thing it's useful for is when one wants to reshare something rare. As reshare unfriendly as torrent files generally are (making filenames part of infohash instead of just a hint wasn't the brightest idea imho), it's still possible if one knows the file/directory names and ... can control piece size.

Sure it's corner case, but valid reason none the less.

Changed 8 years ago by lav

add -s option forces set custom piece size

comment:12 in reply to: ↑ 9 Changed 8 years ago by BobBib

  • Keywords patch added
  • Resolution wontfix deleted
  • Status changed from closed to reopened

Replying to x190:

Why is this labeled a "wontfix"? It seems to be important for a segment of users and perhaps someone will produce a patch.

And finally some patch has been submitted by lav; IMHO, it needs a review; thus, I'm reopening this ticket again (excuse me if I'm wrong).

comment:13 Changed 8 years ago by jordan

  • Component changed from Transmission to Utils
  • Milestone changed from None Set to 2.80
  • Owner changed from Menschheit to jordan
  • Status changed from reopened to new

IMO this is one of those features that will only be used by a handful of people and doesn't belong in the GUI apps. However, it seems less out-of-place in a lower-level tool like transmission-create... I'm not even sure that util existed when this ticket was created :)

comment:14 Changed 8 years ago by jordan

  • Status changed from new to assigned

comment:15 Changed 8 years ago by jordan

  • Resolution set to fixed
  • Status changed from assigned to closed

Added to transmission-create in r13800. Thanks for the patch, lav

Changed 8 years ago by lav

Check for correct value of the piece size

comment:16 Changed 8 years ago by lav

  • Resolution fixed deleted
  • Status changed from closed to reopened

I just attached patch for check correct value of the piece size, and calculate piece size up to 16Mb piece size.

comment:17 Changed 8 years ago by jordan

  • Resolution set to fixed
  • Status changed from reopened to closed

This second patch is unrelated to the ticket's description -- it belongs in a separate ticket. Re-closing this ticket.

As for the patch itself... Transmission's used the depthstrike piece size recommendations for years now. I'd like to hear more about what makes this patch correct and the depthstrike recommendations incorrect...

comment:18 Changed 8 years ago by cfpp2p

Thanks lav for the patches. They are working nicely for me :)

Note: See TracTickets for help on using tickets.