Re: Thread Performance Tuning
Re: Thread Performance Tuning
- Subject: Re: Thread Performance Tuning
- From: email@hidden
- Date: Sun, 7 Mar 2010 15:50:23 -0800
Looking closer, it seems that this is not a cpu swapping problem, but
possibly a swapping out, cache miss type problem.
Looking at the over all User and Sytem load shows:
When audio distorting: The user cpu is 26, while the system is 53.
When audio clean: The user cpu at 50 and the system is 32 and audio is clean.
Something has forced the system to pay much more attention to my process.
On Sun, Mar 7, 2010 at 12:27 PM, <email@hidden> wrote:
> 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