site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1248950050; bh=x9LVivoeUI849bJkEaQSMSpslgeZjx5B4L82CjCGoo8=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=XYc8WjT9WV4UPWU/bCyBpDiyEJyO7S6Lm5oNK5thYanjFT3YPYowPYe3UCr/x7+Lu8Gh28+cLKgr2F5LkjqwoGhOrN8eElAXV5p7lHr4SApQc39meCe4z4IaLYdB+S5xs011orO2/EmadqvbStGlgl6rBzX4CWZBps+mzI7OdkQ= Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=BKELjpWEGj5Vh1imeNkLFPUh8t1Ef4K7SYGDzOG+LMMzWqmRvVKZZ1lrKV1Admo5T9958JdIiKb7v/VfI3sMoXI75r4qZNwPJuwY49AsPvRFZNLhrQzL2HFKq5yPMLMLrASYloHLtpYTRqvkrBTGsoiVAt4m99mYo14VHGmS+X0=; Hi!
If you did all that and shark still showed 60/40 when you think your preferred app should have taken more CPU, and you verified your app is not stalling naturaly with a CPU intensive dummy load for comparison, you should file a bug report, including your shark trace.
I do not know if he has done it, but I have done some testing before writing to this mailing list. I have used two programs, named "nice": int main(int argc, char *argv[]) { if (setpriority(PRIO_PROCESS, 0, 20) != 0) { perror("setpriority"); return 1; } int j; for (j = 0; ; j++) { printf("%d\n", j); // Busy wait int i; for (i = 0; i < 100000000; i++); } return 0; } (Notice that this program has also IO so it can also block and thus leave even more CPU to higher prioritized processes.) and "load": int main(int argc, char *argv[]) { unsigned int i; for (i = 0; i < 4000000000U; i++); } (Just CPU operations, no IO, no threading, nothing.) I have been measuring it on a 8 CPU system. I have ran: for i in {1..8}; do (time ./load &) 2>> log ; done and measured it 10 times. Then I ran first 8 "nice" processes and left them running. And then I repeated 10 measurements with "load" program. for i in {1..8}; do ./nice > /dev/null & done for i in {1..8}; do (time ./load &) 2>> log.nice ; done In the first case I got such values: - user time - mean: 10.0283 - standard deviation: 0.0008 - real time - mean: 10.1099 - standard deviation: 0.0731 In the seconds case I got such values: - user time - mean: 10.0284 - standard deviation: 0.0005 - real time - mean: 18.3226 - standard deviation: 0.2548 So instead of 10 seconds dummy program ran 18 seconds because eight processes with the lowest possible priority run at the same time. This is not really "run only while idle" behavior. Mike _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com