Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux Virtual Server: Users

[lvs-users] [PATCH v2] IPVS: logging sizeof(struct ip_vs_conn) on startup

 

 

Linux Virtual Server users RSS feed   Index | Next | Previous | View Threaded


heder at google

Jul 27, 2009, 6:13 AM

Post #1 of 4 (812 views)
Permalink
[lvs-users] [PATCH v2] IPVS: logging sizeof(struct ip_vs_conn) on startup

No more guessing, how much memory used by IPVS for a connection.

[. The number printed is a lower bound, as ip_vs_conn_cache uses
SLAB_HWCACHE_ALIGN. ]

Signed-off-by: Hannes Eder <heder [at] google>
Signed-off-by: Simon Horman <horms [at] verge>

net/netfilter/ipvs/ip_vs_core.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c
index b021464..b6bb4a0 100644
--- a/net/netfilter/ipvs/ip_vs_core.c
+++ b/net/netfilter/ipvs/ip_vs_core.c
@@ -1475,7 +1475,8 @@ static int __init ip_vs_init(void)
goto cleanup_conn;
}

- IP_VS_INFO("ipvs loaded.\n");
+ IP_VS_INFO("ipvs loaded (using at least %Zd bytes/connection).\n",
+ sizeof(struct ip_vs_conn));
return ret;

cleanup_conn:


_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer
Send requests to lvs-users-request [at] LinuxVirtualServer
or go to http://lists.graemef.net/mailman/listinfo/lvs-users


davem at davemloft

Jul 27, 2009, 11:48 AM

Post #2 of 4 (752 views)
Permalink
Re: [lvs-users] [PATCH v2] IPVS: logging sizeof(struct ip_vs_conn) on startup [In reply to]

From: Hannes Eder <heder [at] google>
Date: Mon, 27 Jul 2009 15:13:57 +0200

> No more guessing, how much memory used by IPVS for a connection.
>
> [. The number printed is a lower bound, as ip_vs_conn_cache uses
> SLAB_HWCACHE_ALIGN. ]
>
> Signed-off-by: Hannes Eder <heder [at] google>
> Signed-off-by: Simon Horman <horms [at] verge>

Who needs to know this? A developer?

They can run tools such as 'pahole' et al. to fish out this
information even when only a kernel binary is available.

For the user, it's just noise.

I'm not applying this, sorry.

_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer
Send requests to lvs-users-request [at] LinuxVirtualServer
or go to http://lists.graemef.net/mailman/listinfo/lvs-users


horms at verge

Jul 27, 2009, 5:19 PM

Post #3 of 4 (742 views)
Permalink
Re: [lvs-users] [PATCH v2] IPVS: logging sizeof(struct ip_vs_conn) on startup [In reply to]

On Mon, Jul 27, 2009 at 11:48:45AM -0700, David Miller wrote:
> From: Hannes Eder <heder [at] google>
> Date: Mon, 27 Jul 2009 15:13:57 +0200
>
> > No more guessing, how much memory used by IPVS for a connection.
> >
> > [. The number printed is a lower bound, as ip_vs_conn_cache uses
> > SLAB_HWCACHE_ALIGN. ]
> >
> > Signed-off-by: Hannes Eder <heder [at] google>
> > Signed-off-by: Simon Horman <horms [at] verge>
>
> Who needs to know this? A developer?
>
> They can run tools such as 'pahole' et al. to fish out this
> information even when only a kernel binary is available.
>
> For the user, it's just noise.
>
> I'm not applying this, sorry.

Surprisingly its a very common question amongst users,
because they want to know how much memory they need.
It is of course all a bit silly, because the amount of
memory used by the connection table is usually very small,
but people still ask.


_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer
Send requests to lvs-users-request [at] LinuxVirtualServer
or go to http://lists.graemef.net/mailman/listinfo/lvs-users


eric.dumazet at gmail

Jul 27, 2009, 10:38 PM

Post #4 of 4 (751 views)
Permalink
Re: [lvs-users] [PATCH v2] IPVS: logging sizeof(struct ip_vs_conn) on startup [In reply to]

Simon Horman a écrit :
>
> Surprisingly its a very common question amongst users,
> because they want to know how much memory they need.
> It is of course all a bit silly, because the amount of
> memory used by the connection table is usually very small,
> but people still ask.
>

If SLUB is used

$ cat /sys/kernel/slab/ip_vs_conn/object_size

If SLAB is used, take fourth column of :

$ grep ip_vs_conn /proc/slabinfo

BTW these take into account L1 cache size alignment

_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer
Send requests to lvs-users-request [at] LinuxVirtualServer
or go to http://lists.graemef.net/mailman/listinfo/lvs-users

Linux Virtual Server users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.