From: David Miller <davem@davemloft.net>
To: anton@samba.org
Cc: netdev@vger.kernel.org, miltonm@bga.com
Subject: Re: Spurious "TCP: too many of orphaned sockets", unable to allocate sockets
Date: Wed, 25 Aug 2010 00:59:29 -0700 (PDT) [thread overview]
Message-ID: <20100825.005929.15250658.davem@davemloft.net> (raw)
In-Reply-To: <20100825071626.GA13681@kryten>
From: Anton Blanchard <anton@samba.org>
Date: Wed, 25 Aug 2010 17:16:26 +1000
> We have a machine running a network test that regularly hits:
>
> TCP: too many of orphaned sockets
>
> Which comes from:
>
> int orphan_count = percpu_counter_read_positive(
> sk->sk_prot->orphan_count);
>
> sk_mem_reclaim(sk);
> if (tcp_too_many_orphans(sk, orphan_count)) {
...
> 2. Even with this fixed we could hit the original issue. We have been known to
> test on 1024 thread boxes and we would have the possibility of 32 * 1024
> = 32k slack in the percpu counters. On this box tcp_max_orphans will be
> 64k after the fix which is a bit close for comfort. Should we do anything here?
Solution seems simple, if the too many orphan check triggers, simply
redo the check using the expensive but more accurate per-cpu counter
read (which avoids the skew) to make sure.
next prev parent reply other threads:[~2010-08-25 7:59 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-25 7:16 Spurious "TCP: too many of orphaned sockets", unable to allocate sockets Anton Blanchard
2010-08-25 7:17 ` [PATCH] tcp: Fix sysctl_tcp_max_orphans when PAGE_SIZE != 4k Anton Blanchard
2010-08-25 7:39 ` Eric Dumazet
2010-08-25 7:59 ` David Miller
2010-08-25 17:50 ` Eric Dumazet
2010-08-25 23:57 ` David Miller
2010-08-26 0:38 ` Anton Blanchard
2010-08-26 3:53 ` David Miller
2010-08-26 6:36 ` Anton Blanchard
2010-08-26 4:45 ` Eric Dumazet
2010-08-26 5:15 ` [PATCH] tcp: fix three tcp sysctls tuning Eric Dumazet
2010-08-26 6:02 ` David Miller
2010-08-26 6:21 ` Eric Dumazet
2010-08-25 7:59 ` David Miller [this message]
2010-08-25 8:20 ` Spurious "TCP: too many of orphaned sockets", unable to allocate sockets David Miller
2010-08-25 8:47 ` Eric Dumazet
2010-08-25 9:28 ` David Miller
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=20100825.005929.15250658.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=anton@samba.org \
--cc=miltonm@bga.com \
--cc=netdev@vger.kernel.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 NNTP newsgroup(s).