TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

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

100 点作者 c0deR3D超过 3 年前
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&#x27;ve claimed that the responsiveness is therefore increased, which I&#x27;m also believed so.<p>However, this got me wondering, is there exists any tool that can report the &quot;numbers&quot; (e.g., scheduling latency) regarding to the responsivenss? Maybe Google has such tool for testing regression for Android or Chrome OS, sadly, I didn&#x27;t managed to find one.<p>Thanks!<p>[0] <a href="https:&#x2F;&#x2F;github.com&#x2F;pop-os&#x2F;system76-scheduler" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;pop-os&#x2F;system76-scheduler</a>

17 条评论

tanelpoder超过 3 年前
In addition to what others have said:<p>- eBPF script: <a href="https:&#x2F;&#x2F;www.brendangregg.com&#x2F;blog&#x2F;2016-10-08&#x2F;linux-bcc-runqlat.html" rel="nofollow">https:&#x2F;&#x2F;www.brendangregg.com&#x2F;blog&#x2F;2016-10-08&#x2F;linux-bcc-runql...</a><p>- perf sched: <a href="https:&#x2F;&#x2F;www.brendangregg.com&#x2F;blog&#x2F;2017-03-16&#x2F;perf-sched.html" rel="nofollow">https:&#x2F;&#x2F;www.brendangregg.com&#x2F;blog&#x2F;2017-03-16&#x2F;perf-sched.html</a><p>- schedlat: <a href="https:&#x2F;&#x2F;tanelpoder.com&#x2F;posts&#x2F;schedlat-low-tech-script-for-measuring-cpu-scheduling-latency-on-linux&#x2F;" rel="nofollow">https:&#x2F;&#x2F;tanelpoder.com&#x2F;posts&#x2F;schedlat-low-tech-script-for-me...</a><p>The last one (written by me) is using &#x2F;proc&#x2F;PID&#x2F;schedstat pseudofile for monitoring % time spent in the CPU runqueue of a single process (not systemwide). I don&#x27;t always have (root) access for running perf or eBPF scripts (or the old Linux&#x2F;kernel version don&#x27;t allow that). But I can still measure how much time a process on a request&#x27;s critical path (like a RDBMS transaction log writer on commit) spent waiting to get back onto CPU before doing any work.<p>Like others have already said, the OS CPU queuing&#x2F;scheduling latency is just one component contributing to the total responsiveness&#x2F;reaction latency of your app.
ahartmetz超过 3 年前
For input device to screen measurement, high frame rate camera on your phone. Accuracy isn&#x27;t the best, but what you measure is as real as it gets.
评论 #30210347 未加载
评论 #30211190 未加载
ahub超过 3 年前
Not sure if it&#x27;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&#x2F;file with different settings might yield results that are different depending on your scheduling config, while staying close to a &quot;real world&quot; example. He shared [1] the tool he made for the tests.<p>I&#x27;d be curious to know your results regardless of the technique used.<p>[0] <a href="https:&#x2F;&#x2F;pavelfatin.com&#x2F;typing-with-pleasure&#x2F;" rel="nofollow">https:&#x2F;&#x2F;pavelfatin.com&#x2F;typing-with-pleasure&#x2F;</a> [1] <a href="https:&#x2F;&#x2F;github.com&#x2F;pavelfatin&#x2F;typometer" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;pavelfatin&#x2F;typometer</a>
assemblylang超过 3 年前
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])<p>[0] <a href="https:&#x2F;&#x2F;github.com&#x2F;zen-kernel&#x2F;zen-kernel" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;zen-kernel&#x2F;zen-kernel</a><p>[1] <a href="https:&#x2F;&#x2F;liquorix.net&#x2F;" rel="nofollow">https:&#x2F;&#x2F;liquorix.net&#x2F;</a>
评论 #30211342 未加载
评论 #30211450 未加载
评论 #30211477 未加载
PaulDavisThe1st超过 3 年前
<a href="https:&#x2F;&#x2F;wiki.linuxfoundation.org&#x2F;realtime&#x2F;documentation&#x2F;howto&#x2F;tools&#x2F;cyclictest&#x2F;faq" rel="nofollow">https:&#x2F;&#x2F;wiki.linuxfoundation.org&#x2F;realtime&#x2F;documentation&#x2F;howt...</a><p>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&#x2F;GUI), this is likely to play some role your testing process.
hulitu超过 3 年前
Con Kolivas (maintainer of BFS) had at one time some tools.
评论 #30214066 未加载
unwind超过 3 年前
I wonder if Ben Heck&#x27;s &quot;Controller Monitor&quot; [1] would help. It&#x27;s a dedicated low-level (microcontroller-driven) high-speed input sampling&#x2F;logging platform, with support for reading a light sensor which I believe is used to sense on-screen changes.<p>It has the advantage of using game console joypads as inputs, and hacking them to read the buttons etc directly, i.e. without relying on USB. I imagine a specialized version that just sampled a mouse button would be more useful in the context of a computer running desktop apps.<p>Apologies if I completely misunderstood the intent of this post.<p>[1] <a href="https:&#x2F;&#x2F;www.benheck.com&#x2F;xbox1monitor&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.benheck.com&#x2F;xbox1monitor&#x2F;</a>
halz超过 3 年前
Weird, the measurement scale they use does not jive with the scale of the knobs being tweaked. For example, `sched_cfs_bandwidth_slice_us` is adjusted by the project&#x27;s `bandwidth_size` knob. The default is 5000 us, or 5 ms. But the knob they mention it being &#x27;5 us&#x27;. Same goes for scheduling latency-- its not `us`, its `ms`.<p>And afaik, the &#x27;sauce&#x27; used in Liquorix is MuQSS, by Con Kolivas. But the project has been put on ice somewhat recently[0].<p>[0]<a href="https:&#x2F;&#x2F;ck-hack.blogspot.com&#x2F;2021&#x2F;08&#x2F;514-and-future-of-muqss-and-ck-once.html" rel="nofollow">https:&#x2F;&#x2F;ck-hack.blogspot.com&#x2F;2021&#x2F;08&#x2F;514-and-future-of-muqss...</a>
stefan_超过 3 年前
The linux-rt project has a variety of test programs for this:<p><a href="https:&#x2F;&#x2F;wiki.linuxfoundation.org&#x2F;realtime&#x2F;documentation&#x2F;howto&#x2F;tools&#x2F;rt-tests" rel="nofollow">https:&#x2F;&#x2F;wiki.linuxfoundation.org&#x2F;realtime&#x2F;documentation&#x2F;howt...</a><p>But beware, &quot;scheduling latency&quot; has very little to do with responsiveness as it would appear to a user of some desktop environment.
throwaway8582超过 3 年前
I&#x27;ve used `cyclictest` for this before, it&#x27;s a simple command line application that measures how long it takes to wake up and run a user space process in response to an interrupt. I&#x27;ve used it in the context of minimizing latency for network and audio applications. I&#x27;m not sure how much this relates to desktop application responsiveness as there are additional layers involved.
smoldesu超过 3 年前
You&#x27;re probably looking for sysprof: <a href="http:&#x2F;&#x2F;www.sysprof.com&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.sysprof.com&#x2F;</a>
jonahbenton超过 3 年前
My major latency hangups are not around happy path input to response in a single app but around memory management across multiple apps including multiple browser hosted apps. Optimizing swap to occur AHEAD of the user&#x27;s next task switch is an entirely unsolved problem.
AtlasBarfed超过 3 年前
That would be some tough things to measure.<p>How much can you slow down a cpu anyway? Can you slow it to 1&#x2F;10th its clock speed? I would think the best way to measure things like this is to slow down the overall system speed as much as possible.
评论 #30220007 未加载
marcodiego超过 3 年前
If the computer is slow enough under load, you can use wall clock to count many seconds it takes to start a program that needs to load many libs and data (LibreOffice, Firefox, Blender, GIMP).<p>You can also watch FPS of supertuxkart when the system is under load: <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=c5bAOJkX_uc" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=c5bAOJkX_uc</a> <a href="https:&#x2F;&#x2F;github.com&#x2F;hakavlad&#x2F;le9-patch" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;hakavlad&#x2F;le9-patch</a><p>But yes, we need a popular well behaved benchmark to measure desktop responsiveness.
Animats超过 3 年前
Tracy? It&#x27;s mostly used by game devs.
Bancakes超过 3 年前
Consider also compiling a realtime configuration of the kernel with the periodic timer ticks.
eloh超过 3 年前
I can recommend this one: <a href="https:&#x2F;&#x2F;apps.apple.com&#x2F;de&#x2F;app&#x2F;is-it-snappy&#x2F;id1219667593" rel="nofollow">https:&#x2F;&#x2F;apps.apple.com&#x2F;de&#x2F;app&#x2F;is-it-snappy&#x2F;id1219667593</a><p>Was mentioned on HN some time ago.
评论 #30211784 未加载