WebPagetest Forums
Docker wptagent cpu throttle ? - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: WebPagetest (/forumdisplay.php?fid=7)
+--- Forum: Private Instances (/forumdisplay.php?fid=12)
+--- Thread: Docker wptagent cpu throttle ? (/showthread.php?tid=16080)



Docker wptagent cpu throttle ? - eva2000 - 06-04-2020 04:15 PM

First time docker wpt user and I have managed to get wpt server and wptagent installed and running but 3g emulated moto gen4 isn't throtling the cpu ? I don't think ?

Is this the correct way to enable cpu throttling for wptagent ?

Code:
docker run -d -p 4001:80 \
    --network="host" \
    --name wptagent \
    -e "SERVER_URL=http://localhost:4000/work/" \
    -e "LOCATION=Test" \
    -e "EXTRA_ARGS='--throttle'" \
    --cap-add="NET_ADMIN" \
    --shm-size=1g \
    webpagetest/agent



RE: Docker wptagent cpu throttle ? - josebolos - 06-06-2020 02:31 AM

I encountered exactly the same problem as you recently while trying to set up my private instance. I managed to solve it and my private instance has been running now for a few weeks with CPU throttling, so I've just created an issue in the repo to see if we can fix it for everyone: https://github.com/WPO-Foundation/wptagent/issues/354

You can see the whole details in the issue, but to summarise:
  • The docker image is missing the cgroup-tools package, this will need to be added to the image
  • The cgroup filesystem inside /sys is read-only but the cgroup tools expect it to be writeable in order to create and manage the cgroups.

I don't know if the fix is safe to use (from a security point of view) as I'm not familiar with Docker, but you may want to try it fix and see if it helps you.


RE: Docker wptagent cpu throttle ? - eva2000 - 06-09-2020 06:59 PM

cheers thanks for sharing the workaround Smile