/srv/irclogs.ubuntu.com/2014/06/13/#ubuntu-kernel.txt

=== psivaa-afk is now known as psivaa
=== psivaa is now known as psivaa-afk
=== psivaa-afk is now known as psivaa
YaannnnHi17:03
YaannnnI'm looking for help with high performance 1-to-1 NAT17:04
apwask your question you never know we might know, or know who to point you at17:04
YaannnnI have trouble NATing 10gbits with 1000 1-to-1 rules17:05
apwand the trouble is? throughput?17:05
YaannnnYep + packetloss17:06
Yaannnnthe server never reaches 10gbit/s when they are many flows17:06
apwyeah that is somewhat beyond out experience i would say, #ubuntu-server may have done something like that17:06
YaannnnOk, thx, i'm gonna look for help there then :)17:07
YaannnnThe only thing I can say is that with normal iptables the CPU is used by Hardware IRQ and with Xtables it's softirq which are using the CPU17:08
trippeh_Yaannnn: Do you have any stateful netfilter modules loaded? As soon any of those conntrack thingies are loaded into the kernel throughput can often plummet when many flows is involved.18:09
=== chuck__ is now known as zul
trippeh_1-1 nat should be able to run statelessly, without conntrack, IIRC18:09
trippeh_Yaannnn: also rules get evaluated in order, you should look at moving the most used rules to the front, maybe even grouping into chains to limit the amount of searching done per packet18:11
Yaannnntrippeh_: The problem is that by default iptables loads conntrack18:12
trippeh_what iptables target are you using to do the natting?18:12
Yaannnntrippeh_: We tried the default DNAT/SNAT18:13
trippeh_iptables only loads the modules needed for its targets and matches to work, conntrack is not really default unless you use a match or target requiring it18:13
Yaannnntrippeh_: but we also tried with rawpost from X-tables18:13
trippeh_SNAT/DNAT would load conntrack indeed18:13
trippeh_You might want to try out SNPT and DNPT18:15
Yaannnntrippeh_: is it mainstream ?18:15
trippeh_Yaannnn: it should exist in 14.04 at least18:15
trippeh_its pretty recent, but mainstream18:15
Yaannnntrippeh_: according to the man it seems to be IPV6-specific18:16
trippeh_oh, hum *tries*18:17
trippeh_Granted, I've only used it on ipv6 myself :)18:17
Yaannnntrippeh_: did you try NETMAP ?18:18
Yaannnntrippeh_: I tried DNETMAP but without sucess, the server was not able to reach 10gbit with lots of flows18:18
trippeh_if you cant get rid of conntrack, you might want to try out kernel 3.15, it has significant performance boosts for conntrack on multicore systems18:19
Yaannnntrippeh_: do you know about any kernel tweaks which could help ?18:20
Yaannnntrippeh_: did you try out nftables ? We are trying this but it doesn't seems to behave but we didn't activate the rbtree module18:22
trippeh_Yaannnn: there is a conntrack table size that can be tuned, but other than that there is not that many tunables18:23
trippeh_maybe pinning ethernet ports to cpu's could help18:24
trippeh_have not gotten around to nftables yet no18:24
trippeh_yeah looks like SNPT/DNPT fails for ipv418:25
Yaannnntrippeh_: I was thinking about tweaks on interrupt handling18:25
Yaannnntrippeh_: But I don't know what is possible on this side18:25
trippeh_and netmap seems to load conntrack too, hmm18:26
trippeh_tweaks on interrupt handling = typically cpu pinning :)18:26
trippeh_I wonder if SNAT/DNAT/NETMAP would still work with -j CT --notrack in raw table18:28
trippeh_if its just address to address mapping18:28
Yaannnntrippeh_: nop, already tried that :P18:29
Yaannnntrippeh_: the traffic doesn't flow anymore18:29
trippeh_bummer18:29
trippeh_maybe try out 3.15 ;)18:29
Yaannnntrippeh_: are conntrack entries created on each packet processed for UDP packets ?18:29
apwthere is a 3.15 final kernel in utopic as of like yesterday18:29
apwi believe they are, bacuase a udp pairing is a flow18:30
trippeh_Yaannnn: no, it will try to match existing conntrack entry18:30
trippeh_Yaannnn: switch to ipv6 :-)18:31
trippeh_ahem18:31
Yaannnntrippeh_: Haha, I whish I could :), gonna try the 3.1518:31
apwok, so i am suggesting there is a contrack entry made for the flow18:31
apwwhich means on the first one, and those get reused18:32
apwbah i'll butt out18:32
trippeh_:)18:32
trippeh_I find it odd that there is appearantly no stateless address rewriting facility for ipv418:33
Yaannnntrippeh_: Yep, they are some but in X-tables18:33
Yaannnntrippeh_: And it doesn't perform well18:34
trippeh_right18:34
trippeh_did you make sure conntrack modules were not loaded into kernel memory when you tried it? :)18:34
trippeh_say, from earlier playing around18:35
Yaannnntrippeh_: what is the low latency version of the kernel ?18:35
apwlowlatency is a slight config change, it is a preempt enabled, and irq via threads18:36
Yaannnnapw: ok, thx, it which situation is it supposed to help ?18:37
Yaannnnin *18:37
apwit exists for the audio folk who will burn overall performance for latency18:38
Yaannnntrippeh_: yep, we blacklisted the conntrack modules18:40
Yaannnnapw: trippeh_ : Doesn't seem to be a lot better with the 3.15, maybe more level on the rules could improve the results18:49
YaannnnI'm stopping my tests for today18:49
YaannnnThanks for your help :)18:50
ekarlsowill 3.16 be in the july update for the kernel ?18:52
trippeh_hm. the NPT v6 module seems very simple. I wonder how well a straight over port would work on v418:58
=== retoad is now known as retoaded

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!