I have the following problem, i have a program that transmits data between two hosts in LAN. The program works perfectly so far but my problem is the following, how do i achieve the best speed possible? I mean i am trying various combinations such as the time between packets, the size of the packets and the buffer size, but it seems impossible to find the ideal point between these three variables. If i put too small pauses between the packets, i get an error, if i put a way too large buffer, i get an error. Any suggestions and ideas are welcome (or if your reference some sources that would be cool too).

Side note: So far the best i can do is 137MB in just under half a minute (on average). Is that a satisfying speed?

Last edited by Mekire on Thu Apr 10, 2014 6:38 am, edited 1 time in total.
Reason: First post lock.
Aber

Posts: 1
Joined: Thu Apr 10, 2014 5:19 am

You'd need to give way more details than that for us to be able to give you any concrete advice: what kind of packets are you sending, exactly how are you sending them, what errors are you getting, etc (also, what is this question to do with Python?). However, in general, the optimal packet size will depend on a whole bunch of factors, including network characteristics. Larger packets will give you a better data/overhead ratio; however if the drop rate is high for your network then you will be losing and re-sending a lot of data with each lost packet.

Aber wrote:Side note: So far the best i can do is 137MB in just under half a minute (on average). Is that a satisfying speed?

That amounts to about 4 MB/s. Again, it depends on characteristics of your network whether that's "good", but that seems reasonable; On an unloaded Gigabit Ethernet LAN, I would expect to be able to get higher (but again, depends on your router, hard drives, etc). In most real systems, performance is is a constraint, not a goal. Is 4 MB/s good enough for what you want to do? If so, leave it at that, if not, then you need to start profiling your system and see where you bottlenecks are. They could be in your program, but they also could be in the network (in which case you won't be about to do much without a hardware update).
setrofim

Posts: 288
Joined: Mon Mar 04, 2013 7:52 pm