fibtest
fibtest copied to clipboard
Errors when running on Kops AMI or EKS
Thank you for this utility!
When running on a Kops AMI (after running apt-get install libc-dev
) I get errors like
sh: 1: cannot create /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor: Directory nonexistent
There is a /sys/devices/system/cpu/cpufreq/
directory but not a per-cpu cpufreq
directory. I would appreciate it if you would update the tool to take this into account. I'd offer a PR, but I don't understand the nuances of what you are doing to be sure of the right solution. Just deleting the cpu0/
part of the path did not solve the problem.
OS details:
# uname -a
Linux ip-10-105-15-150 4.9.0-9-amd64 #1 SMP Debian 4.9.168-1+deb9u5 (2019-08-11) x86_64 GNU/Linux
# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=debian
...
This also happens under Amazon's EKS:
# uname -a
Linux <redacted> 4.14.165-133.209.amzn2.x86_64 #1 SMP Sun Feb 9 00:21:30 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
# cat /etc/os-release
NAME="Amazon Linux"
VERSION="2"
ID="amzn"
ID_LIKE="centos rhel fedora"
VERSION_ID="2"
...
Also, what is a reasonable amount of throttling? I thought the Amazon AMI had the CFS scheduler patch (4.14.165 > 4.14.154 where the patch landed), but it was throttled as much as the Kops AMI.
The script is attempting to set the CPU performance governor, which may not be available on AWS. Simply comment out the offending line. This script is intended to hit 100% throttling for the test 5000ms / 100 ms periods = 50 periods. A properly functioning kernel should see roughly
Throttled for: 51 CPU Usage (msecs) = 510
In both the single threaded ($ runfibtest 1) and in the multithreaded case ($ runfibtest).
This application wasn't really meant to handle all use cases, but more as a proof of failure to other kernel engineers. I will accept pull requests though.
Unfortunately, without the offending code, I'm seeing the same behavior on the unpatched kernel where we are seeing throttling problems under Kubernetes, Debian 4.9.168-1+deb9u5 (2019-08-11):
Throttled for: 51 CPU Usage (msecs) = 511
as for the patched kernel, 4.14.165-133.209.amzn2.x86_64 #1 SMP Sun Feb 9 00:21:30 UTC 2020:
Throttled for: 51 CPU Usage (msecs) = 515
@chiluk I forked this project intending to make a PR, but it seems like I may be hijacking your intent. What I have at Nuru/fibtest is strictly meant as a test for the "low cpu usage with high throttling" bug. The README no longer applies.
If you want it as a PR, let me know and I will contribute it. If you want me to release it as a separate project with a different name, please either change the license to the MIT license or give me explicit permission to make a derivative work without having to comply with section 4 of the Apache license. (I find section 4 really irritating for a project like this.)