Live data from Hacker News

Ask HN: Is there any tool for benchmarking responsiveness for Linux?

news.ycombinator.com

31–40 of 48 posts

Re: Ask HN: Is there any tool for benchmarking responsiveness for Linux?

#31
post #15

IIRC the Zen Linux kernel[0] is designed to be more responsive for desktop usage than the mainline Linux kernel. I wonder what metrics these tools would provide on the same exact system except with the 2 different kernels. (also see Liquorix patch set for additional patches on top of Zen[1]) [0] https://github.com/zen-kernel/zen-kernel [1] https://liquorix.net/

Anybody out there using this? Thinking of trying it on my older thinkpad.

I hear it doesn't yield considerable differences on beefier hardware, but you can tell the difference on older stuff. Thinkpad may benefit.

Note that Liqourix is not the Zen kernel though.

Re: Ask HN: Is there any tool for benchmarking responsiveness for Linux?

#32
post #25

Earlier quoted context omitted.

Or use the caps lock key and have that reflected on screen.

Is the caps lock LED even implemented in hardware? I feel like I remember them not responding if my computer freezes but I could be wrong.

I can confirm the LED is not controlled by only keyboard firmware.

I very often use num lock and caps lock responsiveness to check if my PC has hard-locked, and I just recently suffered hard locks while testing S3 on Linux on a new PC. So I am very sure at this point :)

Re: Ask HN: Is there any tool for benchmarking responsiveness for Linux?

#33
In addition to what others have said:

- eBPF script: https://www.brendangregg.com/blog/2016-10-08/linux-bcc-runql...

- perf sched: https://www.brendangregg.com/blog/2017-03-16/perf-sched.html

- schedlat: https://tanelpoder.com/posts/schedlat-low-tech-script-for-me...

The last one (written by me) is using /proc/PID/schedstat pseudofile for monitoring % time spent in the CPU runqueue of a single process (not systemwide). I don't always have (root) access for running perf or eBPF scripts (or the old Linux/kernel version don't allow that). But I can still measure how much time a process on a request's critical path (like a RDBMS transaction log writer on commit) spent waiting to get back onto CPU before doing any work.

Like others have already said, the OS CPU queuing/scheduling latency is just one component contributing to the total responsiveness/reaction latency of your app.

Re: Ask HN: Is there any tool for benchmarking responsiveness for Linux?

#35
https://wiki.linuxfoundation.org/realtime/documentation/howt...

This is the goto tool for measuring SCHED_FIFO (realtime) scheduling performance. If you really care about responsiveness in a broad sense (not just user/GUI), this is likely to play some role your testing process.

Re: Ask HN: Is there any tool for benchmarking responsiveness for Linux?

#36
Not sure if it's relevant but I liked the approach of Pavel Fatin in measuring editor latency [0]. It uses OS level input events and actual rendering on screen. So testing the same editor/file with different settings might yield results that are different depending on your scheduling config, while staying close to a "real world" example. He shared [1] the tool he made for the tests.

I'd be curious to know your results regardless of the technique used.

[0] https://pavelfatin.com/typing-with-pleasure/ [1] https://github.com/pavelfatin/typometer

Re: Ask HN: Is there any tool for benchmarking responsiveness for Linux?

#38
post #4

For input device to screen measurement, high frame rate camera on your phone. Accuracy isn't the best, but what you measure is as real as it gets.

To me the question is how do you use that method to measure keyboard responsiveness? On the camera, you can't quite tell when the key was "supposed" to trigger. I've done these measurements by having a keypress toggle an LED on the keyboard (in firmware), but that glosses over the matrix scan (and potentially debouncing if you implement that wrong). All in all, I've never been fully satisfied there. Maybe you need a…

[deleted]

Re: Ask HN: Is there any tool for benchmarking responsiveness for Linux?

#39
post #4

For input device to screen measurement, high frame rate camera on your phone. Accuracy isn't the best, but what you measure is as real as it gets.

To me the question is how do you use that method to measure keyboard responsiveness? On the camera, you can't quite tell when the key was "supposed" to trigger. I've done these measurements by having a keypress toggle an LED on the keyboard (in firmware), but that glosses over the matrix scan (and potentially debouncing if you implement that wrong). All in all, I've never been fully satisfied there. Maybe you need a…

NVIDIA published LDAT[1] for click-to-photon latency measurements a while ago. The 'Intended' purpose was to measure input latency for gaming but it could probably be reused for measuring responsivity. This would implicitly also measure the hardware but that shouldn't matter when a constant hardware/driver combo is used.

[1]: https://www.nvidia.com/en-us/geforce/news/nvidia-reviewer-to...

Re: Ask HN: Is there any tool for benchmarking responsiveness for Linux?

#40
post #15

IIRC the Zen Linux kernel[0] is designed to be more responsive for desktop usage than the mainline Linux kernel. I wonder what metrics these tools would provide on the same exact system except with the 2 different kernels. (also see Liquorix patch set for additional patches on top of Zen[1]) [0] https://github.com/zen-kernel/zen-kernel [1] https://liquorix.net/

Anybody out there using this? Thinking of trying it on my older thinkpad.

I'm using Pop!_OS, I dont know if I have the update installed or not. For me Pop!_OS is the best distro, since Fedora keeps bugging me out. I'm mostly a RHEL person.
Post reply on HN