vm thrashing - how to detect
vm thrashing - how to detect
- Subject: vm thrashing - how to detect
- From: "Gerriet M. Denkmann" <email@hidden>
- Date: Mon, 4 Apr 2005 20:32:52 +0700
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?
Kind regards,
Gerriet.
_______________________________________________
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