[Info-vax] How to obtain percentage of a given CPU consumed by a process
John Reagan
xyzzy1959 at gmail.com
Mon Jun 6 11:20:22 EDT 2016
On Monday, June 6, 2016 at 8:51:05 AM UTC-4, Johnny Billquist wrote:
> On 2016-06-04 09:40, wrote:
> > On Wednesday, May 25, 2016 at 1:50:16 PM UTC+12, IanD wrote:
> >> I'm looking for a way to find the CPU consumption for a given process on a given CPU...
> >
> > I remember once I brought a VAX virtually to its knees, while recording almost 0% CPU usage. Ask me how...
>
> Thrash the virtual memory system? That's easy...
> Write a program that just hits one byte on each page, and enough pages
> to not be in the working set. The machine will be very busy just paging...
>
The Modified Page List will make those page faults really cheap. Removing a page from a working set rarely causes any immediate page file activity. You'll just be shuffling PTEs between your working set and the MPL. Only when you get into really tight memory situations will you need to physically write out the pages. We've run systems with large physical memory without any page files.
On this system (which does have an installed page file):
$ show memory
System Memory Resources on 6-JUN-2016 11:14:12.65
Physical Memory Usage (pages): Total Free In Use Modified
Main Memory (127.99GB) 16777168 13441949 3334466 753
I doubt we've done any writes to it since boot.
The better way is to keep allocating memory and writing to it. If your system manager has given you sufficient page file quota, you can log in multiple times and push hard on that MPL.
More information about the Info-vax
mailing list