Thread Performance Tuning
Thread Performance Tuning
- Subject: Thread Performance Tuning
- From: email@hidden
- Date: Sun, 7 Mar 2010 12:27:11 -0800
Hello,
I'm starting a user-level thread with posix_threads at the highest
SCHED_FIFO priority, on a Core 2 Duo 2ghz Mackbook running 10.5.
This thread receives audio over udp from a core audio server in
another process, does some processing, then sends it back to the core
audio server to be played.
I can increase the workload of this thread to find out where
distortion of the audio begins. This happens when the work load is
set to 1200 and Activity Monitor shows 55% cpu usage. (A single work
load is crudely written deinterleaving of a 64 sample 8 channel audio
frame).
Now the interesting part is if I start FireFox, play a youtube video,
then exit, I can increase the work load to 2500 and 95% cpu usage
before distortion happens.
My uneducated guess was the thread is being forced to another core,
but I want to hear why you guys think, and how can I get this
performance all the time.
I've looked into the Thread Affinity API, but the doc seems to say
this works only on systems with multiple-L2 caches, one for each cpu
and I don't think a Core 2 duo qualifies.
I could start a true kernel thread if that will give me more control
of this, but would rather leave in user land for now.
Also interested in any tools that will shed light on what's going on.
Thanks
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden