[Libtorrent-devel] Representative "record size" for rtorrent I/O

Josef Drexler josef at ttdpatch.net
Sat Oct 10 13:07:48 UTC 2009


On Oct 10, 2009, at 2:39 PM, spiro at fea.st wrote:
>
>> The "record size" would then be determined by the kernel's memory
>> manager settings, and while rtorrent uses mmaps with a size given by
>> each torrent's chunk size property, that doesn't mean the kernel will
>> read or write using that size as well.
>
> I definitely need to read up more.  Any pointers as to where to find
> info about "the kernel's memory manager settings"?  I am using  
> 2.6.30.x
> kernel under Debian x64.


The data basically goes into the filecache, so any settings regarding  
filecache write-back might be relevant. It's probably filesystem- 
specific too, especially with FS drivers that have allocate-on-write  
strategies. You'll need to ask some kernel gurus for more information  
though.

At a guess, though, the minimum "record size" you speak of would be  
the page size, 4096 bytes on x86 and maybe amd64 too, because that's  
the filecache granularity. However in reality the writeback algorithm  
will probably merge as many consecutive pages as possible and write  
them back in one go, so trying to optimize based on record size isn't  
very likely to get you anywhere.

-- 
Josef Drexler
josef at ttdpatch.net



More information about the Libtorrent-devel mailing list