unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
From: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
To: Eric Wong <e@80x24.org>
Cc: meta@public-inbox.org
Subject: Re: trying to figure out 100% CPU usage in nntpd...
Date: Wed, 11 Sep 2019 05:44:35 -0400	[thread overview]
Message-ID: <20190911094435.GB3548@pure.paranoia.local> (raw)
In-Reply-To: <20190910181224.urhyoo6av7mhjs67@dcvr>

On Tue, Sep 10, 2019 at 06:12:24PM +0000, Eric Wong wrote:
> > It does seem like there's perhaps a leak somewhere?
> 
> Probably.  Not seeing any of that on my (smaller) instances;
> but those -httpd haven't been restarted in weeks/months.
> 
> The "PerlIO_" prefix is created from open(..., '+>', undef), so
> it either has to be for:
> 
> 1. POST bodies for git http-backend
> 
> 1. git cat-file --batch-check stderr
> 
> 3. experimental ViewVCS|SolverGit which isn't configured on lore :)
> 
> = git-http-backend
> 
> Looking at the size (984), PerlIO_* prefix and proximity of FD
> numbers, I think those lines above are git-http-backend POST body.

Pretty sure that's the culprit. This is how we replicate between
lore.kernel.org to erol.kernel.org:

- once a minute, two nodes that are behind erol.kernel.org grab the
  newest manifest.js.gz
- if there are changes, each updated repository is pulled from
  lore.kernel.org, so if there were 5 repository updates, there would be
  10 "git pull" requests

I switched the replication nodes to pull once every 5 minutes instead of
once every minute and I see a direct correlation between when those
processes run and the number of broken pipes and "/tmp/PerlIO_*
(deleted)" processes showing up and hanging around. Not every run
produces these, but increase spikes come in roughly 5-minute intervals.
On the first run after public-inbox-httpd restart, the correlation is
direct:

this is from one of the mirroring nodes:

[82807] 2019-09-11 09:30:02,044 - INFO - Updating 18 repos from https://lore.kernel.org

this is on lore.kernel.org after the run is completed:

# ls -al /proc/{16212,16213,16214,16215}/fd | grep deleted | wc -l
36

> Any git-http-backend stuck from people fetching/cloning?

No, all git processes seem to exit cleanly on both ends.

> This is -httpd writing to varnish, still, right?

We bypass varnish for git requests, since this is not generally useful.
Nginx goes straight to public-inbox-httpd for those.

I did run some updates on lore.kernel.org on Thursday, including kernel
(3.10.0-957.27.2), nginx (1.16.1) and public-inbox updates. For the
latter, it went from f4f0a3be to what was latest master at the time
(d327141c).

Hope this helps, and thanks for your help!

-K

  parent reply	other threads:[~2019-09-11  9:44 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-08 10:45 [PATCH] nntp: regexp always consumes rbuf if "\n" exists Eric Wong
2019-09-08 10:52 ` trying to figure out 100% CPU usage in nntpd Eric Wong
2019-09-09 10:05   ` Konstantin Ryabitsev
2019-09-09 17:53     ` Eric Wong
2019-09-10  8:38       ` Konstantin Ryabitsev
2019-09-10 18:12         ` Eric Wong
2019-09-11  2:22           ` httpd 502s [was: trying to figure out 100% CPU usage in nntpd...] Eric Wong
2019-09-11 10:24             ` Konstantin Ryabitsev
2019-09-11 17:12               ` Eric Wong
2019-09-11 17:36                 ` Konstantin Ryabitsev
2019-09-12  0:05                   ` Eric Wong
2019-09-12  2:49                     ` Eric Wong
2019-09-12  8:35                       ` Eric Wong
2019-09-12 11:37                         ` Konstantin Ryabitsev
2019-09-13  3:12                           ` Eric Wong
2019-09-13  7:03                             ` Eric Wong
2019-09-13  9:01                             ` Eric Wong
2019-09-13 18:07                             ` Konstantin Ryabitsev
2019-09-14  5:25                               ` Eric Wong
2019-09-11  9:44           ` Konstantin Ryabitsev [this message]
2019-09-11 17:12             ` trying to figure out 100% CPU usage in nntpd Eric Wong

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

  List information: https://public-inbox.org/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190911094435.GB3548@pure.paranoia.local \
    --to=konstantin@linuxfoundation.org \
    --cc=e@80x24.org \
    --cc=meta@public-inbox.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).