New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About pieces.preload.* options #418

Closed
colinhd8 opened this Issue Apr 6, 2016 · 2 comments

Comments

Projects
None yet
2 participants
@colinhd8

colinhd8 commented Apr 6, 2016

What does these options mean:

preload type 0 = Off, 1 = madvise, 2 = direct paging

pieces.preload.type.set = 1
pieces.preload.min_size.set = 262144
pieces.preload.min_rate.set = 5120
and what do they affect?
there is no explain i can fetch by the google, so i post it here.
Thank you.

@rakshasa

This comment has been minimized.

Owner

rakshasa commented Apr 18, 2016

When a piece is to be uploaded to a peer it can preload the piece of the file before it does the non-blocking write to the network. This will not complete the whole piece if parts of the piece is not already in memory, having instead to try again later.

Off means it doesn't do any.

MAdvise means it calls 'madvise' on the file for the specific mmap'ed memory range, which tells the kernel to load it in memory when it gets around to it. Which is hopefully before we write to the network socket.

Direct paging means we 'touch' each file page in order to force the kernel to load it into memory. This can help if you're dealing with very large number of peers and large/many files, especially in a low-memory setting, as you can avoid thrashing the disk where loaded file pages get thrown out before they manage to get sent.

Now if someone would put something like this on the wiki.

@rakshasa rakshasa closed this Apr 18, 2016

@colinhd8

This comment has been minimized.

colinhd8 commented Apr 19, 2016

Thank you for your answer.
1.So if i have a large memory and dealing with very large number of peers and large/many files, the best type of preload is the "Direct paging", right?
2.Through iotop command, i found that rtorrent doesn't cache the read operation(total disk read = actual disk read all the time).
3.As there is a large memory on the system, i want to cache all of the disk operation so protect the disk, i want know how to config it.
4.hould i increase the receive/send buffer?

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment