Live data from Hacker News

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

news.ycombinator.com

11–20 of 48 posts

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

#12
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/

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

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

What about fpga which issues a (fake) ps2 keypressed signal and synchronous trigger (led in this case) for the camera?

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

#14

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/

Liquorix isn't the Zen kernel, but it's a set of patches on top of Linux, including Zen among others.

https://github.com/zen-kernel/zen-kernel

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

#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.

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

#16

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/

[deleted]

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

#17
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.

I built one! Arduino Leonardo and a light dependent transistor:

https://github.com/willmuldrew/lagmeter

(It attempts to do a few other things but it’s best for measuring keyboard event to screen update latency)

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

#18
post #16

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/

[deleted]

[deleted]

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

#20

Earlier quoted context omitted.

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

So if you check the appendix section, they say they're measuring latency not when the keyswitch makes contact, but when the finger first begins pressing on the key. So they're taking key travel time into account, and that ends up being the majority of the "latency".

It's a fair point for the gaming argument they make, if you want to jump 30ms quicker you'll need shorter keys. But it's not really correct to say the keyboard is adding so much latency when it's actually the user.

Post reply on HN