Just written a small script to test network/firewall performance in Python, and could not help myself from testing it on both XP and Linux.....
>
Is this related to Python or the OS?
It's 6 times faster even when not using Python, so what do you think?
It's probably 'just' tuning though, the default window sizes are in the
same ratio.
Is this related to Python or the OS?
From the output:
TCP window size: 8.00 KByte (default)
TCP window size: 49.4 KByte (default)
>
I don't pretend to be an expert on TCP/IP, but might the window size
have something to do with it?
>
Paul
Tuning the TCP window size will make a big difference with Windows XP
performance. I'm more curious about the original script. Either the
test was against the loopback address, or he has a very impressive
netork to sustain 1.8Gbit/s.
>
>
It's 6 times faster even when not using Python, so what do you think?
It's probably 'just' tuning though, the default window sizes are in the
same ratio.
Sockets and pipes are a terrible way to do local interprocess
communication, but it's what we've got. The problem is that what you
want is a subroutine call, but what the OS gives you is an I/O operation.
If you want to see it done right, take a look at QNX messaging. QNX
does everything, including I/O and networking, via its interprocess
communication message passing system. There's the cost of one extra
copy for every I/O operation, but you don't notice it much in practice.
I've run 640x480x15FPSx2 4bits video through QNX messaging and only used
2% of an 1.5GHZ x86 CPU doing it.
Sockets and pipes are a terrible way to do local interprocess
communication, but it's what we've got. The problem is that what you
want is a subroutine call, but what the OS gives you is an I/O operation.
Using TCP sockets is ridiculous but Unix domain sockets aren't that
bad. There's also mmap or shm.
Comment