[BitTorrent] file preallocation: can we have the feature back?

Georgi Georgiev chutz at gg3.net
Tue Jul 13 21:33:18 EDT 2004

  I have a problem when downloading bigger files. The fragmentation level of
  the downloaded files is usually horrible, and the fibmap tool reports an
  average of 70% of fragemntation within a file. In practice, this usually
  means that when I decide to copy the file somewhere else (to defragment it) I
  get like 3MB/s speed of reading and a heavy CPU utilization, compared to the
  steady 20MB/s when working with a (almost) non-fragmented file.

  I read the cvs log for Storage.py and StorageWrapper.py and I saw lots of
  references to allocation (which is how I know it already existed at a point
  of time), but I couldn't understand how the deveopment process went. I didn't
  look at the changes to the code, because it wasn't clear when the change that
  I am interested in, happened.

  From what I gather, once upon a time there was background allocation (which
  doesn't seem to be anymore?) which sounds sort of the right solution to the
  problem. However, it seems it was dropped, because file-systems that support
  sparse files, do not in reality allocate the space for the file? I made some
  very trivial changes to the BitTorrent code myself, and it seems that on my
  system (Linux 2.6.7, reiserfs) the space is allocated if you actually write
  something to the file, and I was writing zeroes, using something like
  storage.write(piece_len * len, "\0" * len), which was not that bad for single
  files. Allocating a big file like this was taking some time, and "du"
  reported the complete size in the end.

  So, can we get the file-allocation feature back, probably at the cost of
  another command-line option?

|    Georgi Georgiev   |  If you can't be good, be careful. If you     |
|     chutz at gg3.net    |  can't be careful, give me a call.            |
|   +81(90)6266-1163   |                                               |

------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!

Yahoo! Groups Links

<*> To visit your group on the web, go to:

<*> To unsubscribe from this group, send an email to:
    BitTorrent-unsubscribe at yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:

More information about the BitTorrent mailing list