WebPagetest Forums
long "Waiting for Idle" in wptagent - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: WebPagetest (/forumdisplay.php?fid=7)
+--- Forum: Private Instances (/forumdisplay.php?fid=12)
+--- Thread: long "Waiting for Idle" in wptagent (/showthread.php?tid=14830)



long "Waiting for Idle" in wptagent - mangoo - 03-31-2017 11:35 AM

I'm using wptagent on Linux (excellent work!).

When I look at wptagent stdout/stderr output, it sometimes waits quite long (20-30 secs) in "Waiting for Idle...", on an otherwise idle server.

How exactly is it determined?


RE: long "Waiting for Idle" in wptagent - pmeenan - 03-31-2017 10:53 PM

It waits for the CPU to go EXTREMELY idle. Specifically, no single core using more than 20% for at least 500ms. If there are other tasks running it could easily cause it to wait for the full time. On a 4 core system with HT that means overall CPU under 2.5%.

There are 2 different places where it will wait for idle. At startup it will wait for up to 10 minutes, basically to let the OS finish starting up and initializing things before starting to poll for work.

After launching the browser it will wait up to 30 seconds for idle to let the browser finish doing all of it's startup initialization before running the test.

If you run top during the time when it is waiting for idle you should be able to get an idea for what process is causing it to delay. If it's the browser itself then it may be related to slow storage (i.e. hard drive vs ssd) as it initializes caches, etc.