BOINC slows MacOSX CPU scheduling?

Message boards : Questions and problems : BOINC slows MacOSX CPU scheduling?
Message board moderation

To post messages, you must log in.

AuthorMessage
Phil Karn

Send message
Joined: 17 Sep 07
Posts: 2
Message 23219 - Posted: 21 Feb 2009, 11:08:50 UTC

I've been wondering why my file transfers from my Mac Pro to a local Linux server were so slow, only about 1-2 megabytes/sec (they're connected with GigE).

I took a packet trace and ran it through tcptrace to produce a TCP time sequence plot. I could see that there was a burst of traffic every 200 ms or so, then a long pause in which the Mac simply didn't send anything, then another burst, and so on. No dropped packets, no timeouts, no protocol violations. The Mac simply wasn't sending anything for 200 ms at a time.

On a hunch I suspended BOINC, which was running four jobs (this is a 4-CPU Mac Pro). My throughput immediately jumped to over 10 MB/sec. Ah ha!

Now I need to know how BOINC interacts with the Mac OSX scheduler. I had thought that as lowest priority tasks, everything associated with BOINC would nearly immediately relinquish the CPU to any higher priority task that becomes ready to run. That indeed is the only reason any of us agree to run BOINC. But it seemed that BOINC, or something in the kernel running on its behalf, held onto all four CPUs for 200 milliseconds before letting at least one of them go to service my higher priority disk and network I/O.

There should have been very little CPU contention, because even at full speed (with BOINC off) my transfers took only a few percent of the CPU at user and system level. BOINC was also doing no disk I/O, so there should have been no disk contention either.

Any ideas?

ID: 23219 · Report as offensive
Profile Jord
Volunteer tester
Help desk expert
Avatar

Send message
Joined: 29 Aug 05
Posts: 15482
Netherlands
Message 23221 - Posted: 21 Feb 2009, 13:11:49 UTC - in response to Message 23219.  

Does that computer use an internal (embedded) network interface? For if so, it's the CPU that caters for the moving of data from your drive to the network (chip) card. The CPU will already try to keep track of whatever is being read from and written to a hard drive, while having any embedded stuff (video card, audio, network) will also use the CPU for its use. When all cores of the CPU are then busy with other things, this can cause this slow down.

As for BOINC (or more precise the science applications) releasing the CPU, this doesn't happen instantaneously. 200 milliseconds = 0.2 seconds. It's still fast enough. If you were talking about having to wait 20 seconds, it would be something else.
ID: 23221 · Report as offensive

Message boards : Questions and problems : BOINC slows MacOSX CPU scheduling?

Copyright © 2024 University of California.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.