Low level networking: performance issues
I spent a few hours working on a multicast file transfer program, written in Python, with a friend of mine. The experience was filled with ups and downs. It was good to see that we were able to handle low level stuff such as broadcast packets, for example, in Python. On the other hand, two things were a problem from the start: timing, and raw performance.
Timing problems surfaced out as we were trying to synchronize operations on the reception side. For several reasons, the multicast file transfer can't operate using TCP/IP, or any other unicast flow control algorithm, so we had to implement a low level protocol on top of standard UDP datagrams. Most techniques available to keep the transmission rate under control are rather difficult to implement in this case. In the end, we found out that was very difficult to get optimum performance when trying to receive data and write it to a local file at the same time. Timing was surprisingly critical in this case, and that made the second problem -- raw performance -- specially difficult to live with. We tried to use threads, and several other techniques, with little or no luck. We either have too long queues, or a low effective transfer rate. We knew it was going to be hard, but this is going beyond our worst-case plans.
Our best bet, at this point, is that a clever rate control algorithm can be used to alleviate some of the problems we had so far; we intend to transmit data at just the right speed, using a rate that is fast enough to give good performance, but still not so much as not to fill reception buffers to the point where we drop packets. We're going to try it over the next week. We hope to have good results to present in a very short time.
Timing problems surfaced out as we were trying to synchronize operations on the reception side. For several reasons, the multicast file transfer can't operate using TCP/IP, or any other unicast flow control algorithm, so we had to implement a low level protocol on top of standard UDP datagrams. Most techniques available to keep the transmission rate under control are rather difficult to implement in this case. In the end, we found out that was very difficult to get optimum performance when trying to receive data and write it to a local file at the same time. Timing was surprisingly critical in this case, and that made the second problem -- raw performance -- specially difficult to live with. We tried to use threads, and several other techniques, with little or no luck. We either have too long queues, or a low effective transfer rate. We knew it was going to be hard, but this is going beyond our worst-case plans.
Our best bet, at this point, is that a clever rate control algorithm can be used to alleviate some of the problems we had so far; we intend to transmit data at just the right speed, using a rate that is fast enough to give good performance, but still not so much as not to fill reception buffers to the point where we drop packets. We're going to try it over the next week. We hope to have good results to present in a very short time.
13 Comments:
At January 26, 2005 at 6:23 AM, Paul Moore said…
It's interesting that this illustrates exactly one of the recurring ideas in the "Python speed" debates - raw performance is worse, but development time is so much better that you can concentrate on developing better algorithms.
I'd be interested to hear how you get on.
At March 24, 2005 at 10:57 PM, Anonymous said…
Hi- any chance that you'd be willing to publish your application, both as an educational aide for others, and that it sounds like a very useful piece of software?
At January 3, 2007 at 9:25 AM, Anonymous said…
Attention Blog Owners...!!! WARNING: A new immensely powerful viral marketing system has been released, which allows marketers to broadcast messages directly to people's desktops. Learn more about it here: making money using the internet site. It pretty much covers making money using the internet related stuff and it is FREE to join.
At February 5, 2007 at 11:40 AM, Anonymous said…
Check this out for FREE...
This opportunity says:
"Your Ad" Will Be Instantly Displayed on Thousands of Websites and Read By Over 10 Million People Per Week For FREE, and It Only Takes 60 Seconds To Get Started!
To find out more visit: business consultant site. It successfully exposes FREE information covering Traffic and business consultant related stuff.
At February 17, 2007 at 6:39 AM, Anonymous said…
Do you agree with me that making money online is not easy but it is easy to loose a lot of money in online business? To find the secrets to **Making Money Online** checkout this secret website I just found **email list building** and checkout these secret principles.
At February 28, 2007 at 9:46 PM, Anonymous said…
Like your blog about money exchange.
Have bookmarked it!
Come check out my site about money exchange
At March 6, 2007 at 9:55 AM, Anonymous said…
earn cash make money online
Enjoy the opportunity, change your life -earn cash make money online. Don't Miss www.MoneyMakerSecrets.com For Your Success - Visit Today...
At August 18, 2007 at 5:36 AM, Anonymous said…
Great article! Thanks.
At August 18, 2007 at 11:19 AM, Anonymous said…
Thanks for interesting article.
At September 10, 2007 at 1:18 AM, Anonymous said…
Excellent website. Good work. Very useful. I will bookmark!
At March 4, 2016 at 7:54 PM, Anonymous said…
ninest123 16.03
prada outlet, nike outlet, longchamp outlet, burberry outlet, gucci handbags, ralph lauren polo, cheap jordans, louis vuitton outlet, louis vuitton outlet online, oakley sunglasses, uggs on sale, louis vuitton outlet, tiffany jewelry, replica watches, ralph lauren outlet, michael kors outlet, longchamp outlet, cheap oakley sunglasses, ray ban sunglasses, michael kors handbags, replica watches, michael kors outlet online, oakley sunglasses, uggs on sale, louboutin shoes, christian louboutin, ray ban sunglasses, uggs outlet, nike free, christian louboutin, uggs outlet, tiffany jewelry, nike air max, oakley sunglasses, longchamp bags, uggs on sale, michael kors outlet online, michael kors outlet online, nike air max, louis vuitton handbags, oakley sunglasses, louis vuitton, ray ban sunglasses, louboutin uk, michael kors, tory burch outlet, burberry factory outlet, prada handbags
At March 4, 2016 at 8:01 PM, Anonymous said…
swarovski jewelry, coach outlet, links of london uk, canada goose, canada goose pas cher, moncler, barbour, ugg pas cher, louis vuitton, supra shoes, converse, wedding dresses uk, pandora charms, canada goose uk, karen millen uk, ugg,uggs,uggs canada, canada goose outlet, louis vuitton uk, pandora uk, replica watches, moncler, moncler pas cher, ugg,ugg australia,ugg italia, moncler, swarovski uk, canada goose outlet, canada goose jackets, moncler, converse shoes outlet, bottes ugg pas cher, barbour jackets uk, canada goose jackets, hollister, marc jacobs, thomas sabo uk, ugg uk, toms shoes, moncler uk, sac louis vuitton, sac louis vuitton, gucci, pandora jewelry, moncler jackets, juicy couture outlet, pandora jewelry, montre pas cher, juicy couture outlet, canada goose, louis vuitton, moncler outlet, ray ban, lancel
ninest123 16.03
At April 29, 2016 at 12:32 AM, chenlili said…
2016-4-29 xiaobao
michael kors
nfl jerseys
fitflops sale clearance
michael kors bags
toms shoes
true religion jeans
nike nfl jerseys
coach factory outlet
ray ban wayfarer
timberland boots
cheap jerseys
michael kors outlet
louis vuitton outlet
michael kors outlet online
jordan retro 3
michael kors outlet
michael kors handbags
oakley sunglasses wholesale
nike uk
michael kors outlet
michael kors handbags
gucci outlet
ray ban uk
nike roshe flyknit
kate spade handbags
longchamp bags
michael kors outlet
nike air force
nike uk
air jordan pas cher
coach outlet
christian louboutin sale
toms
coach outlet
polo ralph lauren
cheap jordans
louis vuitton outlet
true religion shorts
ray ban sunglasses
Post a Comment
<< Home