Skip to contentSkip to conversation

Why "Connection tracking" decreases performance of netfilter!? any idea ?

DISCUSSION Mahdi Samadi 2 participants 2 messages Apr 22, 2003 – Apr 27, 2003 netfilter

lore
Share & tools
lore
#0 lore raw

Hello to allDose any know why connection tracking decreases the performance of Linux?Is it any way to have both of them? (connection tracking and performance)I alse check this situation by changing the value of "ip_conntrack_max" to high, but performance is still very bad,Is there a configuration for kernel to solve this problem? I checked the performance by netperf, when i have no connection-tracking result is as below: (Throughtput is 94 M/s and number of connect/request/response is 2793/sec)-------- No conntrack ------------client <-cross cable-> Linux <-cross cable-> server :
./netperf -t TCP_STREAM -l 60 -H x.x.x.x

TCP STREAM TEST to x.x.x.x

Recv Send Send

Socket Socket Message Elapsed

Size Size Size Time Throughput

bytes bytes bytes secs. 10^6bits/sec

87380 16384 16384 60.01 94.12

----------------------------------------

./netperf -t TCP_CRR -l 120 -H x.x.x.x

TCP Connect/Request/Response TEST to x.x.x.x

Local /Remote

Socket Size Request Resp. Elapsed Trans.

Send Recv Size Size Time Rate

bytes Bytes bytes bytes secs. per sec

131070 131070 1 1 119.99 2793.74

16384 87380

--------------With Conntrack------------------

But when i enable Conntection tracking, performance is as below (Throughtput is 93 M/s and number of connect/request/response is 140/sec)

./netperf -t UDP_STREAM -l 60 -H x.x.x.x -- -m 1024

UDP UNIDIRECTIONAL SEND TEST to x.x.x.x

Socket Message Elapsed Messages

Size Size Time Okay Errors Throughput

bytes bytes secs # # 10^6bits/sec

65535 1024 60.00 687698 0 93.90

65535 60.00 686612 93.75

./netperf -t TCP_CRR -l 120 -H x.x.x.x

TCP Connect/Request/Response TEST to x.x.x.x

Local /Remote

Socket Size Request Resp. Elapsed Trans.

Send Recv Size Size Time Rate

bytes Bytes bytes bytes secs. per sec

131070 131070 1 1 119.99 140.56

16384 87380

------------------------------
Thanks,Be success--samadi

---------------------------------
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.

#1 lore raw
Quoted 2 lines · Mahdi Samadi

Hello to all
Dose any know why connection tracking decreases the performance of Linux?

Please stop and think for a minute. You are trying to keep track of the state of two TCP stacks, allocating about 340 bytes of kernel-only memory and adding significant l3/l4 parsing to every packet - and you are asking why that decreases performance???

Quoted 4 lines

Is it any way to have both of them? (connection tracking and performance) I alse check this situation by changing the value of "ip_conntrack_max" to high, but performance is still very bad,Is there a configuration for kernel to solve this problem?

Pleae read the FAQ and the mailing list archives. You need to change the hash bucket number.

Signature · 5 lines
- Harald Welte <[email protected]>             http://www.netfilter.org/
============================================================================
  "Fragmentation is like classful addressing -- an interesting early
   architectural error that shows how much experimentation was going
   on while IP was being designed."                    -- Paul Vixie