tag:blogger.com,1999:blog-29153919.post8765514165594141099..comments2024-03-29T07:25:20.120+00:00Comments on MonoTorrent: Alanhttp://www.blogger.com/profile/17518005985877464643noreply@blogger.comBlogger8125tag:blogger.com,1999:blog-29153919.post-75935970584042698032011-10-25T19:25:16.306+01:002011-10-25T19:25:16.306+01:00Quite effective info, thanks so much for the post....Quite effective info, thanks so much for the post.consejo comprar yatehttp://yatesspain.blogspot.comnoreply@blogger.comtag:blogger.com,1999:blog-29153919.post-54880475160678962452006-11-05T02:41:00.000+00:002006-11-05T02:41:00.000+00:00I've taken a look at deluge-torrent. It's a python...I've taken a look at deluge-torrent. It's a python wrapper around the C++ libtorrent library. So it's running on some pretty stable code. The interface is a little cluttered at the moment (the bottom pane is quite crowded) but it is looking nice!<br /><br />Every time i look at other bittorrent GUI's and i look at the one i have here, i want to make a new better one :( Tis a pity i don't have the time at the moment.Alanhttps://www.blogger.com/profile/17518005985877464643noreply@blogger.comtag:blogger.com,1999:blog-29153919.post-33581032739046099242006-11-02T13:06:00.000+00:002006-11-02T13:06:00.000+00:00Off topic: just give a look a this new library/cli...Off topic: just give a look a this new library/client http://code.google.com/p/deluge-torrent/niihttps://www.blogger.com/profile/06523517455186567237noreply@blogger.comtag:blogger.com,1999:blog-29153919.post-8390891910835269522006-11-02T02:20:00.000+00:002006-11-02T02:20:00.000+00:00Preliminary results: Perfect. I'll write up a new ...Preliminary results: Perfect. I'll write up a new blog post detailing my new method. It works, seemingly quite accurately, but i'm not quite understanding how it works. Thinking about it logically, i should be be undershooting by a consistant amount (i think). But i'll leave those musings for a seperate post.<br /><br />Thanks a lot john!Alanhttps://www.blogger.com/profile/17518005985877464643noreply@blogger.comtag:blogger.com,1999:blog-29153919.post-21543751455490665872006-11-01T18:25:00.000+00:002006-11-01T18:25:00.000+00:00So basically i'd expect the multiply amount to be ...So basically i'd expect the multiply amount to be somewhere between 0.5 and 1.5 during "accurate" rate limiting. Thats what i'd expect anyway... there are a few cases where it would reach 5 (such as when there arent enough peers to reach the download limit)gfAlanhttps://www.blogger.com/profile/17518005985877464643noreply@blogger.comtag:blogger.com,1999:blog-29153919.post-14793509033456661142006-11-01T18:07:00.000+00:002006-11-01T18:07:00.000+00:00Well, the point in the multiply amount is that my ...Well, the point in the multiply amount is that my idealNumberofChunks is not realistic. It should be resonably close as most of time when i receive a "chunk" from a peer, it will arrive within a short amount of time. Hence if every chunk i receive is 2kB, and my download speed limit is 50 kB/sec, i can receive 25 chunks per second.<br /><br />Now, the problem is that sometimes a 2kB chunk could take 5 seconds, or a chunk won't actually be exactly 2kB, or due to minor inefficiences downloading 25 chunks a second like this won't result in a download speed of averaging exactly 50kB/sec.<br /><br />Suppose i am downloadig 50 chunks per second and each chunk is 1kB in size (just for example). In this case my multiply amount will slowly increase to 2.0, thus giving me a download chunk allowance of idealChunks*2.0, which is 50 chunks. Then 50 chunks (twice my ideal) @ 1kB each is what i need to download each second to achieve my download rate of 50kB/sec.<br /><br />The multiplyAmount is used to make my "ideal" amount of chunks more closely match the "realistic" amount.<br /><br />The number of chunks needed is completely indepenant of the number of concurrent connections. I could download all the chunks from one peer, or 10 chunks from 10 peers, or 50 chunks from 1 peer, and 10 from 5 other peers. So i cant use numberOfConcurrentConnections to aid my algorithm.Alanhttps://www.blogger.com/profile/17518005985877464643noreply@blogger.comtag:blogger.com,1999:blog-29153919.post-37155965611780734842006-11-01T16:24:00.000+00:002006-11-01T16:24:00.000+00:00You say that multiplyAmount is capped at 5.0.
One ...You say that multiplyAmount is capped at 5.0.<br />One nicer idea would be go make it configurable, having as parameter the max munbernof concurrent connections (if I understood its effect, of course).Massihttps://www.blogger.com/profile/10098895975140794643noreply@blogger.comtag:blogger.com,1999:blog-29153919.post-61821095259895673842006-11-01T02:16:00.000+00:002006-11-01T02:16:00.000+00:00This is a classical control problem
Try implement...This is a classical control problem<br /><br />Try implementng a simple PI (proportional-inegral) controller.<br /><br />Should smooth out your oscillations and allow better tracking of the limit<br /><br />There is buckets of sample code for PI controllers on the internet but here is some pseudocode<br /><br />diff = target_rate - actual_rate<br />integral += diff<br />command = diff*cP + integral*cI<br /><br />command can be whatever you want it to be, providing it maps linearly to download rate. cP and CI are constants weighting the influence of the integral and proportional differences<br /><br />Through you experiments above you have implemented a simple proportional controller without knowing it (sans the exponential in method 3). Do some reading on control and you will see adding an integrator will improve the tracking and damp the oscillations.<br /><br />Good LuckJohnhttps://www.blogger.com/profile/16607486305553174549noreply@blogger.com