Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Sep 2012 19:18:06 +0400
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        Ivan Alexandrovich <ivsan@ngs.ru>
Cc:        freebsd-net@FreeBSD.org
Subject:   Re: getting counters for a plenty of vlan ifaces
Message-ID:  <20120919151806.GK85604@FreeBSD.org>
In-Reply-To: <web-25219141@mx16.intranet.ru>
References:  <web-25219141@mx16.intranet.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Sep 16, 2012 at 09:41:19PM +0700, Ivan Alexandrovich wrote:
I> Hi
I> 
I> We are running freebsd9.0 on a router with
I> more than 1000 of subscriber's vlan interfaces.
I> Outgoing packet rate is approximately 40 kpps.
I> 
I> There's a need to collect bytes and packets
I> counters for all those vlan interfaces every
I> minute (or even twice a minute) and store them
I> in a plain text file:
I> <em1.757> <bytes_in> <bytes_out> <pkts_in> <pkts_out>
I> <em1.761> <bytes_in> <bytes_out> <pkts_in> <pkts_out>
I> ...
I> Also I'd like to copy the whole arp table
I> into a file (not so frequently).
I> 
I> Our observations show that using common tools
I> like a snmp daemon can create a significant
I> CPU load. If I'm not mistaken this is due to
I> high rate of context switches that are need
I> to access kernel data from the userspace.

That's strange. Per-minute read shouldn't induce
large CPU load.

What snmp daemon do you use? I remember that several
years ago net-snmp daemon from ports used a single
linked list for all ARP entries, and thus it consumed a lot
of CPU when receiving a single ARP change from routing
socket.

Don't know whether this is still valid. And I hope
in base bsnmpd doesn't have such problem.

-- 
Totus tuus, Glebius.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120919151806.GK85604>