Quantcast

Idle time and sleep/wake notification

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Idle time and sleep/wake notification

Eliot Miranda-2
 
Hi All,

    I've just added tallying of idle time in the VM so that the system report can give more meaningful overheads to the GC information it reports.  Currently the VM tallies idle time in the innards of relinquishProcessorForMicroseconds:.  But it also needs to tally idle time across SLEEP/WAKE events.  May I ask experts in the Mac OS, X11 and Windows worlds to have a loop at event processing and either implement tallying idle time here or reporting back on what work is required or (as I fear in the case of X11/Unix) whether it is unsupported.

Here's an example of the nonsense one gets back after waking one's laptop:
Virtual Machine Statistics
--------------------------
uptime 14h 59m 26s (runtime 11h 53m 33s, idletime 3h 5m 53s)
memory 338,690,048 bytes
old 333,689,744 bytes (98.5%)
young 4,111,360 bytes (1.2%)
used 314,964,392 bytes (93%)
free 21,991,672 bytes (6.5%)
GCs 3,430 (15733.6 ms between GCs 12482 ms runtime between GCs)
full 8 totalling 1,331 ms (0% runtime), avg 166.4 ms
marking 536 ms (40.3%) avg 67 ms,
compacting 795 ms (59.7%) avg 99.4 ms
scavenges 3,422 totalling 2,511 ms (0.01% runtime), avg 0.7 ms
tenures 818,889 (avg 239 tenures per scavenge)
Since last view 2,463 (21394 ms between GCs, 17285 ms runtime between GCs)
uptime 52695.2 s, runtime 42574 s, idletime 10121.2 s
full 2 totalling 322 ms (0% runtime), avg 161 ms
scavenge 2,461 totalling 2,029 ms (0% runtime), avg 0.8 ms
tenures 16,733 (avg 6 tenures per scavenge)

whereas while the machine stays awake we get good information:
Virtual Machine Statistics
--------------------------
uptime 1m 58s (runtime 0m 21s, idletime 1m 37s)
memory 281,018,368 bytes
old 276,018,064 bytes (98.2%)
young 4,111,360 bytes (1.5%)
used 251,951,208 bytes (89.7%)
free 26,712,592 bytes (9.5%)
GCs 37 (3203.5 ms between GCs 569.7 ms runtime between GCs)
full 0 totalling 0 ms (0% runtime), avg 0 ms
scavenges 37 totalling 13 ms (0.06% runtime), avg 0.4 ms
tenures 648 (avg 17 tenures per scavenge)
Since last view 30 (3498 ms between GCs, 590 ms runtime between GCs)
uptime 104.9 s, runtime 17.7 s, idletime 87.2 s
full 0
scavenge 30 totalling 11 ms (0.1% runtime), avg 0.4 ms
tenures 0

_,,,^..^,,,_
best, Eliot
Loading...