Message ID | 20131025092043.GD31491@secunet.com |
---|---|
State | Awaiting Upstream, archived |
Delegated to: | David Miller |
Headers | show |
From: Steffen Klassert <steffen.klassert@secunet.com> Date: Fri, 25 Oct 2013 11:20:43 +0200 > On Fri, Oct 25, 2013 at 01:50:28AM -0700, Eric Dumazet wrote: >> >> 32768 as the default seems fine to me >> >> 448 bytes per dst -> thats less than 30 Mbytes of memory if we hit 65536 >> dst. >> > > Ok, I'll add the patch below to to the ipsec tree if everyone is fine > with that threshold. No objections from me. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Fri, 2013-10-25 at 11:20 +0200, Steffen Klassert wrote: > On Fri, Oct 25, 2013 at 01:50:28AM -0700, Eric Dumazet wrote: > > > > 32768 as the default seems fine to me > > > > 448 bytes per dst -> thats less than 30 Mbytes of memory if we hit 65536 > > dst. > > > > Ok, I'll add the patch below to to the ipsec tree if everyone is fine > with that threshold. > > Subject: [PATCH RFC] xfrm: Increase the garbage collector threshold > > With the removal of the routing cache, we lost the > option to tweak the garbage collector threshold > along with the maximum routing cache size. So git > commit 703fb94ec ("xfrm: Fix the gc threshold value > for ipv4") moved back to a static threshold. > > It turned out that the current threshold before we > start garbage collecting is much to small for some > workloads, so increase it from 1024 to 32768. This > means that we start the garbage collector if we have > more than 32768 dst entries in the system and refuse > new allocations if we are above 65536. > > Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> > --- Sure please add : Reported-by: Wolfgang Walter <linux@stwm.de> Thanks ! -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Sun, Oct 27, 2013 at 11:17:31PM -0700, Eric Dumazet wrote: > On Fri, 2013-10-25 at 11:20 +0200, Steffen Klassert wrote: > > On Fri, Oct 25, 2013 at 01:50:28AM -0700, Eric Dumazet wrote: > > > > > > 32768 as the default seems fine to me > > > > > > 448 bytes per dst -> thats less than 30 Mbytes of memory if we hit 65536 > > > dst. > > > > > > > Ok, I'll add the patch below to to the ipsec tree if everyone is fine > > with that threshold. > > > > Subject: [PATCH RFC] xfrm: Increase the garbage collector threshold > > > > With the removal of the routing cache, we lost the > > option to tweak the garbage collector threshold > > along with the maximum routing cache size. So git > > commit 703fb94ec ("xfrm: Fix the gc threshold value > > for ipv4") moved back to a static threshold. > > > > It turned out that the current threshold before we > > start garbage collecting is much to small for some > > workloads, so increase it from 1024 to 32768. This > > means that we start the garbage collector if we have > > more than 32768 dst entries in the system and refuse > > new allocations if we are above 65536. > > > > Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> > > --- > > Sure please add : > > Reported-by: Wolfgang Walter <linux@stwm.de> Done. Now applied to the ipsec tree, thanks everyone! -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c index ccde542..4764ee4 100644 --- a/net/ipv4/xfrm4_policy.c +++ b/net/ipv4/xfrm4_policy.c @@ -236,7 +236,7 @@ static struct dst_ops xfrm4_dst_ops = { .destroy = xfrm4_dst_destroy, .ifdown = xfrm4_dst_ifdown, .local_out = __ip_local_out, - .gc_thresh = 1024, + .gc_thresh = 32768, }; static struct xfrm_policy_afinfo xfrm4_policy_afinfo = { diff --git a/net/ipv6/xfrm6_policy.c b/net/ipv6/xfrm6_policy.c index 08ed277..dd503a3 100644 --- a/net/ipv6/xfrm6_policy.c +++ b/net/ipv6/xfrm6_policy.c @@ -285,7 +285,7 @@ static struct dst_ops xfrm6_dst_ops = { .destroy = xfrm6_dst_destroy, .ifdown = xfrm6_dst_ifdown, .local_out = __ip6_local_out, - .gc_thresh = 1024, + .gc_thresh = 32768, }; static struct xfrm_policy_afinfo xfrm6_policy_afinfo = {