MacOS X's poor Thread and TCP/IP Performance

Posted:
in macOS edited January 2014
I would like to see a discussion of this article at anandtech:



http://www.anandtech.com/mac/showdoc.aspx?i=2520&p=1



Its a multi-page article that compares the performance of MacOS X and Yellow Dog Linux on dual G5 Macs. The conclusion is that MacOS X (or Darwin I suppose) is MUCH slower when dealing with the creation and management of Threads, Processes and TCP/IP connections.



There is little information on why this is so, other than the wrapping of the kernelthreads and MacOS X's locking mechanism.



I think its interesting to see that YDL has 2-5 times the performance on a slower CPU (dual 2.5 for YDL, dual 2.7 for OS X) than Darwin. Especially on issues that are THIS important.



On a side note, I had a few assignments at uni last semester where I was performing LOTS of IPC (Inter Process Communication) with threads, pipes and through TCP/IP. I think I did 3000 communications with 100, 1 000, 10 000, 100 000 and 1 000 000 bytes, to test the speed and create a graph of the performance.



What I found out was that it took 3-5 times longer on my Mac than on the Lab computers at Uni. My conclusion was that this was because a) the lab computers are much more powerful than my PowerBook, and b) that Java sucks on the Mac. In the light of the Anandtech article, it seems that the reason for the sluggish performance was due to poor IPC handling in the OS, which makes sense at Java asks the OS to handle the creation and manipulation of threads and TCP/IP connections. It also explains why Pipe communications didn't suffer as much on the Mac as compared to the PC (Win XP).



If anyone is interested in the results, I think I still have some of the comparissons that I did...



I would very much like to see a discussion of why this problem is here, why Apple hasn't fixed it, and what Apple can do to fix it (more specifically than "fix the threading issue" )

Comments

  • Reply 1 of 4
    kickahakickaha Posts: 8,760member
    Well, if you were using Java, you added a couple more layers of indirection to the methodology, and lose pretty much any conclusions you can draw as compared to the low level analysis from the article.



    But yeah, it's an interesting result they came up with. This article is *MUCH* better than their last one, which was pretty weak.
  • Reply 2 of 4
    I wonder how the switch to Intel will affect networking performance? PPC uses big endian byte order which is the same as Network byte order. Intel uses little endian which will require byte swapping for network data.
  • Reply 3 of 4
    mr. memr. me Posts: 3,221member
    Quote:

    Originally posted by ThinkingDifferent

    I wonder how the switch to Intel will affect networking performance? PPC uses big endian byte order which is the same as Network byte order. Intel uses little endian which will require byte swapping for network data.



    Rest easy, little one. Intel-based machines have been used in networked environments for better than a decade. Performance has been excellent, even when running a God-awful OS like MS-DOS/Windows for Workgroups 3.1.
  • Reply 4 of 4
    Quote:

    Originally posted by Mr. Me

    Rest easy, little one. Intel-based machines have been used in networked environments for better than a decade. Performance has been excellent, even when running a God-awful OS like MS-DOS/Windows for Workgroups 3.1.



    Actually I am not worried. I was just wondering how network performance of Intel Macs will compare to PPC macs.
Sign In or Register to comment.