Who Has Faster Pipes? Linux, Win2000, WinXP Compared
SeaBait writes: "This revealing article about the High-performance programming techniques on Linux and Windows shows that Linux rules. The performance testing was on Pipes(interprocess communication mechanism available on both Windows and Linux and UNIX). Although I new Linux would fare the best, the poor performance of Windows XP was a surprise. Windows 2000 actually did better than XP!"
Ask your local MCSE, they'll tell you.
ROFL.
My beliefs do not require that you agree with them.
Who you kidding? I'm no windows developer, but even I know you don't use pipes for IPC in windows, it's all COM. COM on windows versus CORBA or DCOP might be interesting.
The big deal about this one is that the testing is done by a real company. It's written by a senior programmer at IBM. Many of us would hesitate to dismiss what he says here. This is not some sponsored study as were many tests that have been done in the past.
As is often the case, Microsoft just threw something together and called it "infrastructure." Linux developers drew on 25 years of UNIX evolution and experience, and made a better product as a result.
-sting3r
What if Windows sockets are faster? What if Windows Disk IO is faster? What about Windows Asynchronous I/O?
I would expect that if any benchmarks came out favoring Windows, and if they were reported here, they would be roundly and loudly shot down with 1) criticisms of the testing protocol, and/or 2) criticisms of the bias of the testing agency. Of course, the same criticisms are just as valid in this case, but of course they are here largely ignored (one poster so far excepted).
All of which just goes to show that the essence of the whole 'Linux-rocks/Windows-sucks' horse that is always being flogged here is that this horse is ultimately flogged by (sometimes blind) faith. Few of the Linux zealots here are going to believe any benchmark/test unless it favors Linux (in which case, they will all praise the study to high heaven) - just look at the lengths people here go to argue that GNOME/KDE provide better-than-mediocre desktops. Similarly, few Windows advocates are going to be convinced that their platform of choice is inferior.
Since all these articles thus amount to preaching to the converted, I suggest that the Slashdot editing team hereafter mark all such articles of theirs as 'Redundant'.
Hey, why can't we rate parent Slashdot articles, anyways ??
Some things to ponder:
This is not to diss IBM, or even to suggest Windows XP/2000 would even win in such a battle, although I suspect they would for massive SMP arrays, simply because Linux doesn't handle those as well.
I also suspect Linux would find itself struggling, when put into a hard real-time setting, an ultra-secure setting, or a distributed setting. The overheads involved would not be huge, but if you have a huge number of processes, each with the maximum number of open pipes, the overheads are being applied a huge number of times. That adds up.
All in all, this suggests that some really severe, rigorous benchmarking needs to be done, under a wide enough variety of conditions to be meaningful. This test just doesn't meet the kinds of conditions I'd expect from a truly determined test.
Now, if I can only convince IBM to loan me a few dozen boxes, I'd be more than happy to do the testing for them...
It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
Unfortunately this article is
comparing apples and oranges.
The Win32 call you need to use is
CreatePipe(), not CreateNamedPipe().
CreatePipe is exactly equivalent to
the UNIX pipe() call. CreateNamedPipe
with the \\pipe prefix is equivalent
to mkfifo on UNIX.
No wonder Win32 is much slower, you're
going through many more layers in the
kernel.
Regards,
Jeremy Allison,
Samba Team.
, but petty things like this are surely pointless. If a HCI group found that Linux was _easier_ to use, then that would be something to applaud but in the days of Gigabit networks and massive processor speeds and huge RAM these sorts of performance things are less important than ever.
Thus spake the virgin programmer. That bullshit about hardware invalidating the need for fast efficient code, is the bullshit rhetoric taught in college classes that brought us the blue screen of death in the first place. Speed and performance do matter as does not hogging memory and efficiency. You will always run into limits on what a machine can do, and in the case of business, writing code that allows 5 servers to do the work of ten at helf the bandwidth is a big deal.
The key to success has already been gained by Linux, it is used by the people who matter (not matter as in personal worth but matter as in matter to the advancement of computing). I couldn't give two shits about Joe Schmoe who wants to check his email and surf for porn, let him use Windows, it's not necessary for everyone to use the same operating system. Use the right tool for the job, and for developement *nix is the best tool.
I'm the big fish in the big pond bitch.
I don't use Linux - and I've been a regular /.er for years. Comparisons like this are interesting, as the previous poster noted - MS spends zillion$ to get their word out, so I see nothing wrong with posting alternative viewpoints here...
Stop by my site where I write about ERP systems & more
I thought the same thing initially, but when I tried using CreatePipe() instead of CreateNamedPipe() I actually got a performance degradation of about 5%. Looking deeper into this, I found that CreatePipe() actually creates a named pipe and places security descriptors on each end which restrict it to unidirectional access (hence the slowdown).
From the MSDN documentation:
Windows NT/2000: Anonymous pipes are implemented using a named pipe with a unique name. Therefore, you can often pass a handle to an anonymous pipe to a function that requires a handle to a named pipe.
Fear: When you see B8 00 4C CD 21 and know what it means
Under windows, there are many things the he "neglected" to notice:
Also:
the term pipe server refers to a process that creates a named pipe, and the term pipe client refers to a process that connects to an instance of a named pipe. This is why you have one method to Create the pipe, and one to Open it. BTW -- the Opening method is a universal resource opening method on windows PCs.
You can go here if you want to know more about pipes on windows.
AND
I also tried his programs, and you don't need that mystical +24 to get it to work. I don't know why he needed it. Perhaps because he was using some old or wierd cl? I'd also suggest that he try to compile it with MSVC (unless he got the cl.exe from there) as I would bet that would make it faster as well.
So, from what I read he basically said "Well, I'm gonna compare this thingy called a 'pipe' over here on windows to this really old and simple 'pipe' thingy over here on linux" without checking to see what was actually under the hoods of the two beasts he was comparing.
Man,
If God gave us curiosity