Re: vm thrashing - how to detect
Re: vm thrashing - how to detect
- Subject: Re: vm thrashing - how to detect
- From: Ben Dougall <email@hidden>
- Date: Tue, 5 Apr 2005 04:07:09 +0100
On Monday, April 4, 2005, at 02:32 pm, Gerriet M. Denkmann wrote:
I have an app which uses lots of memory in a random fashion.
So, if it uses more memory than physical available, it gets incredible
slow - spending all its time swapping memory pages in and out.
This is clearly not acceptable.
I would like to detect this condition, and then switch to an alternate
algorithm which uses no more memory (but runs somewhat slower).
Question: how can my app find out if it uses "too much" memory?
I tried getrusage() but the only values non-zero are user time,
system time, block output operations, and voluntary context switches.
The page reclaims and page fault fields are always zero and so useless.
The point of things going bad is clearly visible in Activity Monitor:
the free memory goes down to a few MB, page in and out suddenly start
going up (from very few to hundreds per second) and the CPU percentage
of my app goes down from 80% to 20%.
But how can my app get these values?
<http://www.omnigroup.com/mailman/archive/macosx-dev/2001-August/
018559.html>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden