473,395 Members | 1,502 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Python / Socket speed

msj
Seems like sockets are about 6 times faster on OpenSUSE than on
Windows XP in Python.

http://pyfanatic.blogspot.com/2007/0...rformance.html

Is this related to Python or the OS?

/MSkou

Feb 26 '07 #1
5 2654

<ms*@infoserv.dkwrote in message
news:11*********************@a75g2000cwd.googlegro ups.com...
Seems like sockets are about 6 times faster on OpenSUSE than on
Windows XP in Python.

http://pyfanatic.blogspot.com/2007/0...rformance.html

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.
Feb 26 '07 #2
On 26 Feb, 15:54, "m...@infoserv.dk" <m...@infoserv.dkwrote:
Seems like sockets are about 6 times faster on OpenSUSE than on
Windows XP in Python.

http://pyfanatic.blogspot.com/2007/0...rformance.html

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

Feb 26 '07 #3
On Feb 26, 7:05 am, "Paul Boddie" <p...@boddie.org.ukwrote:
On 26 Feb, 15:54, "m...@infoserv.dk" <m...@infoserv.dkwrote:
Seems like sockets are about 6 times faster on OpenSUSE than on
Windows XP in Python.
http://pyfanatic.blogspot.com/2007/0...rformance.html
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.

casevh

Feb 26 '07 #4
Richard Brodie wrote:
<ms*@infoserv.dkwrote in message
news:11*********************@a75g2000cwd.googlegro ups.com...
>>Seems like sockets are about 6 times faster on OpenSUSE than on
Windows XP in Python.

http://pyfanatic.blogspot.com/2007/0...rformance.html

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.
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 640x480x15FPSx24bits video through QNX messaging and only used
2% of an 1.5GHZ x86 CPU doing it.

John Nagle
Feb 26 '07 #5
John Nagle <na***@animats.comwrites:
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.
Feb 26 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Rami Saarinen | last post by:
I have been making a client-server type of software mainly on Linux and now I am trying to get it all work also on windows. However, I am having slight problems running the program in Windows 2000....
5
by: Ian McConnell | last post by:
What's the pythonic way of sending out a set of requests in parallel? My program throws an image at the server and then waits for the result. I'm currently using this bit of socket code to send...
3
by: Michael Sparks | last post by:
Hi, I'm posting a link to this since I hope it's of interest to people here :) I've written up the talk I gave at ACCU Python UK on the Kamaelia Framework, and it's been published as a BBC...
0
by: Richard | last post by:
Hi, I'm suffering a socket race condition - I think. The code works fine at full speed on a single CPU machine. However when I run full speed on a 2 Zeon machine the socket drops data on an...
7
by: muttu2244 | last post by:
Hi Everyone I want to run a python script in all the machines that are connected through local network and collect the information about that machine such as HDD size, RAM capacity(with number...
0
by: Kurt B. Kaiser | last post by:
Patch / Bug Summary ___________________ Patches : 375 open ( -3) / 3264 closed (+26) / 3639 total (+23) Bugs : 910 open ( +3) / 5851 closed (+20) / 6761 total (+23) RFE : 217 open...
5
by: sleddd | last post by:
Can anyone explain why socket performance (throughput) varies depending on the amount of data send and recv are called with? For example: try creating a local client/server (running on the same...
0
by: GeicoGecko | last post by:
Hey guys, There was no python section in the "Web Development" forum so I'm hoping I can pose my question in here. Our system We currently have a python webserver using SimpleHTTPServer,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.