From: Waiman Long <longman@redhat.com>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: linux-kernel@vger.kernel.org, rdunlap@infradead.org
Subject: Re: [PATCH] proc/stat: Separate out individual irq counts into /proc/stat_irqs
Date: Thu, 19 Apr 2018 15:28:40 -0400 [thread overview]
Message-ID: <1c3b9cf3-3a36-568f-3da2-e560a721f4aa@redhat.com> (raw)
In-Reply-To: <20180419190846.GE2066@avx2>
On 04/19/2018 03:08 PM, Alexey Dobriyan wrote:
>> Therefore, application performance can be impacted if the application
>> reads /proc/stat rather frequently.
> [nods]
> Text interfaces can be designed in a very stupid way.
>
>> For example, reading /proc/stat in a certain 2-socket Skylake server
>> took about 4.6ms because it had over 5k irqs.
> Is this top(1)? What is this application doing?
> If it needs percpu usage stats, then maybe /proc/stat should be
> converted away from single_open() so that core seq_file code doesn't
> generate everything at once.
The application is actually a database benchmarking tool used by a
customer. The reading of /proc/stat is an artifact of the benchmarking
tool that can actually be turned off. Without doing that, about 20% of
CPU time were spent reading /proc/stat and the trashing of cachelines
slowed the benchmark number quite significantly. However, I was also
told that there are legitimate cases where reading /proc/stat was
necessary in some of their applications.
>> -
>> - /* sum again ? it could be updated? */
>> - for_each_irq_nr(j)
>> - seq_put_decimal_ull(p, " ", kstat_irqs_usr(j));
>> -
> This is direct userspace breakage.
Yes, I am aware of that. That is the cost of improving the performance
of applications that read /proc/stat, but don't need the individual irq
counts.
>
> Proper fix is to start strategic switch away from /proc.
> It is a fun toy but its time has come.
Migration from procfs is easier said then done. Many existing customers
are reluctant to do that.
-Longman
next prev parent reply other threads:[~2018-04-19 19:28 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-19 19:08 Alexey Dobriyan
2018-04-19 19:28 ` Waiman Long [this message]
2018-04-19 19:55 ` Alexey Dobriyan
[not found] ` <eb7c1569-e445-5cbb-6d10-2694b625232a@redhat.com>
2018-04-19 20:39 ` Alexey Dobriyan
2018-04-19 20:58 ` Waiman Long
2018-04-19 23:23 ` Joel Fernandes (Google)
2018-04-21 20:34 ` Alexey Dobriyan
2018-04-21 20:36 ` Alexey Dobriyan
2018-04-24 5:54 ` David Rientjes
2018-04-24 6:18 ` Alexey Dobriyan
2018-05-02 0:02 ` Andrew Morton
2018-04-19 21:05 ` Waiman Long
-- strict thread matches above, loose matches on Subject: below --
2018-04-19 17:09 Waiman Long
2018-04-19 17:38 ` Randy Dunlap
2018-04-19 18:44 ` Waiman Long
2018-04-19 19:43 ` Andrew Morton
2018-04-19 19:57 ` Waiman Long
2018-04-19 20:02 ` Alexey Dobriyan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1c3b9cf3-3a36-568f-3da2-e560a721f4aa@redhat.com \
--to=longman@redhat.com \
--cc=adobriyan@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rdunlap@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®