Kajetan, On Fri, Apr 26, 2013 at 09:50:17PM +0200, Kajetan Staszkiewicz wrote: K> > > > How do you count the 140kpps value? One interface, both, in, out? I'd K> > > > like to relate this somehow to my values. K> > > K> > > Well, generally we see 80kpps rx and 40kpps tx. But I have seen the rx K> > > spike to 150kpps occasionally. K> > K> > Unfortunately at this moment I have no single machine with such traffic, K> > although maybe I can aggregate some traffic later and check the cpu usage K> > then. K> K> OK, got my CPU usage for 30/40kpps, 55/340Mbit/s (public side, in/out). K> K> CPU is 4-core E5540 @ 2.53GHz with HT disabled. K> K> Cpu usage looks more or less like this: K> CPU 0: 0.0% user, 0.0% nice, 0.4% system, 3.9% interrupt, 95.7% idle K> CPU 1: 0.0% user, 0.0% nice, 1.2% system, 18.1% interrupt, 80.7% idle K> CPU 2: 0.0% user, 0.0% nice, 1.6% system, 5.5% interrupt, 92.9% idle K> CPU 3: 0.0% user, 0.0% nice, 0.8% system, 26.8% interrupt, 72.4% idle K> K> Public network card is pinned to cpu 2, internal to cpu 3, each card has only a K> single irq. Netisr threads are limited to cpu 0 and 1, I use deferred netisr. K> K> So yes, I have 2x less pps than you, but also I have quite a slower cpu and K> there still seems to be much cpu power left.
When it comes to contention, the dependence of CPU utilization from amount of data processed isn't linear. While you have low enough pps, a time spent by a CPU in pf is accounted as time of that CPU, and that's all. But if pps are higher, then while that CPU was working in pf, couple more CPUs were spinning on pf lock, and now their CPU time is also utilized and accounted (although they did nothing). -- Totus tuus, Glebius. _______________________________________________ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"