|
Re: Disk cache: msg#00010network.bit-torrent.libtorrent
On Apr 10, 2006, at 20:53, Radu Hociung wrote: Hello Arvid, and all, Yes, this is true in general, my concern is that the characteristics of the dataflow in the bittorrent case is very close to completely random. Talking about the request pattern, the only exception to randomness is the rarest first-algorithm. But this algorithm will also make sure that the distribution among the peers is as uniform as possible at all time, keeping the request pattern as random as possible. It is true though, that in the case where the swarm has tendencies of being "serialized", it is very common to request pieces which were just made available from a peer. But I'm not sure that is a very common case. Obviously some data is needed here. I will use "cheap data" and "expensive data" to refer to in-buffer and true. Please see below for my comments on caching. The client isn't completely free of choosing who to upload to/whose requests to respond do. In order to maximize download speed, it has to upload to those that it can download from. I also think that the most common case is that the output pipe very seldom is saturated. So, I'm not sure weighting peers depending on the pieces they request would work very well, it would affect the behavior of the client in other ways. Your distinction of cheap and expensive data doesn't take seek distance into account. I think that may be the most important thing to concentrate on, at least when it comes to writing. Number 2 is a little bit more interesting though. Since every block Yes, at least to a certain degree. One thing to keep in mind though, is that the number of pieces in a torrent is generally much more than the number of peers that a client can see. How rare a piece is is quantized to the number of peers that has it. This means that the number of equally rare pieces is usually very high, far higher than a write cache would be. In this case, the library should write to disk when downloaded pieces Definitely, I think the disk perfomance is very important. I might add that there's a huge difference for me (OSX 10.4) when downloading in full allocation mode and compact allocation mode. The compact allocation mode will have the effect that most reads and writes are kept relatively close to each other. They will spread out over time of course though. But just downloading with client_test will saturate my connection at slightly above 1 MB/s if I'm in compact mode. In full allocation mode though, I will not get above about 600 kB/s, and my drive is really making a noise and slowing down the computer to be virtually useless. I believe the on-drive cache is better than nothing, O/S cache is better What do you mean? Do you think there would be a point of having a shared cache for all torrents? One benefit would be that if you have 100 torrents but only 2 of them are active, they will get all the cache for themselves. One more thing: That sounds like it could be very useful! I am very interested in your thoughts and comments on caching, Ditto :) So, I think my first attempt will be to cache pieces, and only write whole pieces instead of blocks to disk. To see if the performance is improved. I don't know how to measure it though, maybe I could try saturating my download link in full allocation mode and see if it increases. Do you have any other suggestions that are reasonably easy to try out? -- Arvid Norberg ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Disk cache: 00010, Radu Hociung |
|---|---|
| Next by Date: | Re: Disk cache: 00010, Radu Hociung |
| Previous by Thread: | Re: Disk cachei: 00010, Radu Hociung |
| Next by Thread: | Re: Disk cache: 00010, Radu Hociung |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |