Live data from Hacker News

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

news.ycombinator.com

1–10 of 48 posts

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

#1
System76 recently announced their responsiveness optimizer, System76 Scheduler [0], which basically works as a daemon, adjusting the nice value and the CFS knobs for processes in the box for increased responsiveness. They've claimed that the responsiveness is therefore increased, which I'm also believed so.

However, this got me wondering, is there exists any tool that can report the "numbers" (e.g., scheduling latency) regarding to the responsivenss? Maybe Google has such tool for testing regression for Android or Chrome OS, sadly, I didn't managed to find one.

Thanks!

[0] https://github.com/pop-os/system76-scheduler

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

#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 one-key keyboard that triggers the LED from an interrupt, and then handles the keypress normally. (Only one key, so no matrix. Triggers on the first edge, so no debounce latency.)

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

#5
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…

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

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

#6
post #4

Earlier quoted context omitted.

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…

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

Caps lock doesn't magically skip the matrix scan.

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

#8
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…

AFAIK you'd have to have a pretty bad keyboard for it to have a significant role in latency. I guess specialized hardware (based on a microcontroller with built-in USB host support) wouldn't be too hard to construct if you really needed to know.

For the camera measurement, I would just press the key as fast as possible and pick about 3/4 of the way down as the trigger point.

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

#9
post #4

Earlier quoted context omitted.

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…

AFAIK you'd have to have a pretty bad keyboard for it to have a significant role in latency. I guess specialized hardware (based on a microcontroller with built-in USB host support) wouldn't be too hard to construct if you really needed to know. For the camera measurement, I would just press the key as fast as possible and pick about 3/4 of the way down as the trigger point.

> AFAIK you'd have to have a pretty bad keyboard for it to have a significant role in latency

https://danluu.com/keyboard-latency/ puts a lot of keyboards >= 30 ms which is an insane amount of latency

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

#10

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.

I believe the question is less about input latency than (as mentioned,) scheduling latency or the amount of time from when the scheduler marks a process as 'ready to execute' to the time it actually starts executing.

SchedLat (https://tanelpoder.com/posts/schedlat-low-tech-script-for-me...) is one tool/approach to doing this, but it's a bit out of date.

Post reply on HN