* NAT performance
@ 2005-05-12 21:24 Christophe SUIRE
2005-05-13 0:03 ` Taylor, Grant
0 siblings, 1 reply; 11+ messages in thread
From: Christophe SUIRE @ 2005-05-12 21:24 UTC (permalink / raw)
To: netfilter
Hi,
I have done some tests, and i'm surprise with the poor result with NAT.
I have a linux firewall, 2.6.8 kernel, one card for public network,
and one card for the lan.
All cards are giga bit cards.
I have 10 PC which are each in a VLAN, and with a gateway which is
the virtual VLAN interface under the firewall link with the lan card.
I have 5 switch with a 100Mbit/s uplink to the firewall (with a giga
bit backbone switch). I have 2PC under each switch. So in theory each
PC have 50Mbit/s of bandwidth.
Each PC have 10 alias ip, so i have 10 networks with 10 virtuals
clients under each network.
So each virtual client (100) have 5Mbit/s of bandwidth.
On the firewall each vlan network is SNAT to go out to the internet.
My bandwidth test is done with TPTEST, and a TPTEST server under the
public network of the firewall.
My procedure is : tcp-receive of 50Mo
launch the test for 1 virtual client and get the time
launch the test for 2 virtuals clients together and get the time
for each
....
launch the test for 100 virtuals ...
When i do my test without NAT, just routing, the total bandwidth used
is near to 500Mbit/s, which is great !
But when i do my test with NAT, the total bandwidth used is near to
170Mbit/s !!! So i have an import drop of the performance !
And this bandwidth is the same from 20 virtuals clients to 100
virtuals clients.
So i understand that NAT need to rewrite all packets .. but here the
performance is very poor.
If someone can explain me why ??
Thanks a lot
Christophe SUIRE
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: NAT performance
2005-05-12 21:24 NAT performance Christophe SUIRE
@ 2005-05-13 0:03 ` Taylor, Grant
2005-05-13 7:16 ` Christophe SUIRE
0 siblings, 1 reply; 11+ messages in thread
From: Taylor, Grant @ 2005-05-13 0:03 UTC (permalink / raw)
To: netfilter
Christophe SUIRE wrote:
> Hi,
>
> I have done some tests, and i'm surprise with the poor result with NAT.
> I have a linux firewall, 2.6.8 kernel, one card for public network, and
> one card for the lan.
> All cards are giga bit cards.
> I have 10 PC which are each in a VLAN, and with a gateway which is the
> virtual VLAN interface under the firewall link with the lan card.
> I have 5 switch with a 100Mbit/s uplink to the firewall (with a giga
> bit backbone switch). I have 2PC under each switch. So in theory each
> PC have 50Mbit/s of bandwidth.
> Each PC have 10 alias ip, so i have 10 networks with 10 virtuals
> clients under each network.
> So each virtual client (100) have 5Mbit/s of bandwidth.
> On the firewall each vlan network is SNAT to go out to the internet.
> My bandwidth test is done with TPTEST, and a TPTEST server under the
> public network of the firewall.
> My procedure is : tcp-receive of 50Mo
> launch the test for 1 virtual client and get the time
> launch the test for 2 virtuals clients together and get the time
> for each
> ....
> launch the test for 100 virtuals ...
>
> When i do my test without NAT, just routing, the total bandwidth used
> is near to 500Mbit/s, which is great !
> But when i do my test with NAT, the total bandwidth used is near to
> 170Mbit/s !!! So i have an import drop of the performance !
> And this bandwidth is the same from 20 virtuals clients to 100 virtuals
> clients.
> So i understand that NAT need to rewrite all packets .. but here the
> performance is very poor.
> If someone can explain me why ??
What are the specs on the system you are using as the firewall?
Grant. . . .
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: NAT performance
2005-05-13 0:03 ` Taylor, Grant
@ 2005-05-13 7:16 ` Christophe SUIRE
[not found] ` <Pine.LNX.4.60.0505130423320.5558@darkstar.sysinfo.com>
0 siblings, 1 reply; 11+ messages in thread
From: Christophe SUIRE @ 2005-05-13 7:16 UTC (permalink / raw)
To: netfilter
Hi,
The hardware is :
Xeon 3,4Ghz
1Go of RAM
Intel Giga cards for public an private network (e1000 driver)
2 SCSI U320 Raid 1 hard drives
The system is :
Debian Sarge
Kernel 2.6.8
iptables 1.2.11
Thanks a lot.
--
Christophe
Le 13 mai 05 à 02:03, Taylor, Grant a écrit :
> Christophe SUIRE wrote:
>
>> Hi,
>> I have done some tests, and i'm surprise with the poor result with
>> NAT.
>> I have a linux firewall, 2.6.8 kernel, one card for public
>> network, and one card for the lan.
>> All cards are giga bit cards.
>> I have 10 PC which are each in a VLAN, and with a gateway which
>> is the virtual VLAN interface under the firewall link with the
>> lan card.
>> I have 5 switch with a 100Mbit/s uplink to the firewall (with a
>> giga bit backbone switch). I have 2PC under each switch. So in
>> theory each PC have 50Mbit/s of bandwidth.
>> Each PC have 10 alias ip, so i have 10 networks with 10 virtuals
>> clients under each network.
>> So each virtual client (100) have 5Mbit/s of bandwidth.
>> On the firewall each vlan network is SNAT to go out to the internet.
>> My bandwidth test is done with TPTEST, and a TPTEST server under
>> the public network of the firewall.
>> My procedure is : tcp-receive of 50Mo
>> launch the test for 1 virtual client and get the time
>> launch the test for 2 virtuals clients together and get the
>> time for each
>> ....
>> launch the test for 100 virtuals ...
>> When i do my test without NAT, just routing, the total bandwidth
>> used is near to 500Mbit/s, which is great !
>> But when i do my test with NAT, the total bandwidth used is near
>> to 170Mbit/s !!! So i have an import drop of the performance !
>> And this bandwidth is the same from 20 virtuals clients to 100
>> virtuals clients.
>> So i understand that NAT need to rewrite all packets .. but here
>> the performance is very poor.
>> If someone can explain me why ??
>>
>
> What are the specs on the system you are using as the firewall?
>
>
>
> Grant. . . .
>
>
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: NAT performance
[not found] ` <Pine.LNX.4.60.0505130423320.5558@darkstar.sysinfo.com>
@ 2005-05-13 8:33 ` Christophe SUIRE
2005-05-13 9:22 ` Jozsef Kadlecsik
0 siblings, 1 reply; 11+ messages in thread
From: Christophe SUIRE @ 2005-05-13 8:33 UTC (permalink / raw)
To: R. DuFresne; +Cc: netfilter
Hi,
This not a problem with the network card, because when i do the test
with only firewall routing i have a total bandwidth used near to
500Mbit/s.
But when i add an SNAT translation for each network (10) the total
bandwidth used is near 170Mbit/s.
So why this important difference without an with NAT ??
Thx.
--
Christophe Suire
Le 13 mai 05 à 10:24, R. DuFresne a écrit :
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Fri, 13 May 2005, Christophe SUIRE wrote:
>
>
>> Hi,
>>
>> The hardware is :
>> Xeon 3,4Ghz
>> 1Go of RAM
>> Intel Giga cards for public an private network (e1000 driver)
>> 2 SCSI U320 Raid 1 hard drives
>>
>> The system is :
>> Debian Sarge
>> Kernel 2.6.8
>> iptables 1.2.11
>>
>> Thanks a lot.
>> -- Christophe
>>
>> Le 13 mai 05 à 02:03, Taylor, Grant a écrit :
>>
>>
>>> Christophe SUIRE wrote:
>>>
>>>> Hi,
>>>> I have done some tests, and i'm surprise with the poor result
>>>> with NAT.
>>>> I have a linux firewall, 2.6.8 kernel, one card for public
>>>> network, and one card for the lan.
>>>> All cards are giga bit cards.
>>>> I have 10 PC which are each in a VLAN, and with a gateway which
>>>> is the virtual VLAN interface under the firewall link with the
>>>> lan card.
>>>> I have 5 switch with a 100Mbit/s uplink to the firewall (with a
>>>> giga bit backbone switch). I have 2PC under each switch. So in
>>>> theory each PC have 50Mbit/s of bandwidth.
>>>> Each PC have 10 alias ip, so i have 10 networks with 10 virtuals
>>>> clients under each network.
>>>> So each virtual client (100) have 5Mbit/s of bandwidth.
>>>> On the firewall each vlan network is SNAT to go out to the
>>>> internet.
>>>> My bandwidth test is done with TPTEST, and a TPTEST server under
>>>> the public network of the firewall.
>>>> My procedure is : tcp-receive of 50Mo
>>>> launch the test for 1 virtual client and get the time
>>>> launch the test for 2 virtuals clients together and get the
>>>> time for each
>>>> ....
>>>> launch the test for 100 virtuals ...
>>>> When i do my test without NAT, just routing, the total bandwidth
>>>> used is near to 500Mbit/s, which is great !
>>>> But when i do my test with NAT, the total bandwidth used is near
>>>> to 170Mbit/s !!! So i have an import drop of the performance !
>>>> And this bandwidth is the same from 20 virtuals clients to 100
>>>> virtuals clients.
>>>> So i understand that NAT need to rewrite all packets .. but here
>>>> the performance is very poor.
>>>> If someone can explain me why ??
>>>>
>
>
> If you are doing this all at once, you are likely saturating the
> choke points <firewalls> network interface. All traffic is passing
> there, unless of course you have multi interfaces.
>
>
> Thanks,
>
>
> Ron DuFresne
> - -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> admin & senior security consultant: sysinfo.com
> http://sysinfo.com
> Key fingerprint = 9401 4B13 B918 164C 647A E838 B2DF AFCC 94B0 6629
>
> ...We waste time looking for the perfect lover
> instead of creating the perfect love.
>
> -Tom Robbins <Still Life With Woodpecker>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.4 (GNU/Linux)
>
> iD8DBQFChGRUst+vzJSwZikRAuN4AKCKNvvsHiK5f6bH7i5R47n7Ha2KRACfae+y
> xBwrHTBFFkRA+uEM1wTHkXA=
> =+THk
> -----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: NAT performance
2005-05-13 8:33 ` Christophe SUIRE
@ 2005-05-13 9:22 ` Jozsef Kadlecsik
2005-05-13 9:51 ` Christophe SUIRE
2005-05-13 11:52 ` Feizhou
0 siblings, 2 replies; 11+ messages in thread
From: Jozsef Kadlecsik @ 2005-05-13 9:22 UTC (permalink / raw)
To: Christophe SUIRE; +Cc: netfilter
On Fri, 13 May 2005, Christophe SUIRE wrote:
> This not a problem with the network card, because when i do the test
> with only firewall routing i have a total bandwidth used near to
> 500Mbit/s.
> But when i add an SNAT translation for each network (10) the total
> bandwidth used is near 170Mbit/s.
> So why this important difference without an with NAT ??
NAT *is* expensive. Have a look at the paper on netfilter performance
tests and comparisons at http://people.netfilter.org/kadlec/nftest.pdf
Best regards,
Jozsef
-
E-mail : kadlec@blackhole.kfki.hu, kadlec@sunserv.kfki.hu
PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : KFKI Research Institute for Particle and Nuclear Physics
H-1525 Budapest 114, POB. 49, Hungary
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: NAT performance
2005-05-13 9:22 ` Jozsef Kadlecsik
@ 2005-05-13 9:51 ` Christophe SUIRE
2005-05-13 9:57 ` Jozsef Kadlecsik
2005-05-13 11:52 ` Feizhou
1 sibling, 1 reply; 11+ messages in thread
From: Christophe SUIRE @ 2005-05-13 9:51 UTC (permalink / raw)
To: Jozsef Kadlecsik; +Cc: netfilter
Hi,
A great paper !
But i have done some bandwidth tests which is quiet different ..
I know that NAT *is* expensive .. but i'm surprise that there no
bandwidth difference between 20 client and 100 client.
So i would like to understand why this limit ?
Thx
--
Christophe Suire
Le 13 mai 05 à 11:22, Jozsef Kadlecsik a écrit :
> On Fri, 13 May 2005, Christophe SUIRE wrote:
>
>
>> This not a problem with the network card, because when i do the test
>> with only firewall routing i have a total bandwidth used near to
>> 500Mbit/s.
>> But when i add an SNAT translation for each network (10) the total
>> bandwidth used is near 170Mbit/s.
>> So why this important difference without an with NAT ??
>>
>
> NAT *is* expensive. Have a look at the paper on netfilter performance
> tests and comparisons at http://people.netfilter.org/kadlec/nftest.pdf
>
> Best regards,
> Jozsef
> -
> E-mail : kadlec@blackhole.kfki.hu, kadlec@sunserv.kfki.hu
> PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
> Address : KFKI Research Institute for Particle and Nuclear Physics
> H-1525 Budapest 114, POB. 49, Hungary
>
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: NAT performance
2005-05-13 9:51 ` Christophe SUIRE
@ 2005-05-13 9:57 ` Jozsef Kadlecsik
2005-05-13 10:14 ` Jozsef Kadlecsik
2005-05-13 10:18 ` Christophe SUIRE
0 siblings, 2 replies; 11+ messages in thread
From: Jozsef Kadlecsik @ 2005-05-13 9:57 UTC (permalink / raw)
To: Christophe SUIRE; +Cc: netfilter
On Fri, 13 May 2005, Christophe SUIRE wrote:
> A great paper !
> But i have done some bandwidth tests which is quiet different ..
> I know that NAT *is* expensive .. but i'm surprise that there no
> bandwidth difference between 20 client and 100 client.
> So i would like to understand why this limit ?
Sorry, but I have to ask: don't you hit the limit of ip_conntrack_max?
Best regards,
Jozsef
-
E-mail : kadlec@blackhole.kfki.hu, kadlec@sunserv.kfki.hu
PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : KFKI Research Institute for Particle and Nuclear Physics
H-1525 Budapest 114, POB. 49, Hungary
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: NAT performance
2005-05-13 9:57 ` Jozsef Kadlecsik
@ 2005-05-13 10:14 ` Jozsef Kadlecsik
2005-05-13 10:19 ` Christophe SUIRE
2005-05-13 10:18 ` Christophe SUIRE
1 sibling, 1 reply; 11+ messages in thread
From: Jozsef Kadlecsik @ 2005-05-13 10:14 UTC (permalink / raw)
To: Christophe SUIRE; +Cc: netfilter
On Fri, 13 May 2005, Jozsef Kadlecsik wrote:
> On Fri, 13 May 2005, Christophe SUIRE wrote:
>
> > A great paper !
> > But i have done some bandwidth tests which is quiet different ..
> > I know that NAT *is* expensive .. but i'm surprise that there no
> > bandwidth difference between 20 client and 100 client.
> > So i would like to understand why this limit ?
>
> Sorry, but I have to ask: don't you hit the limit of ip_conntrack_max?
Probably not. But as far as I see, you cannot specify the source IP
address at tptest. Are you sure the IP address aliases were used at all?
Best regards,
Jozsef
-
E-mail : kadlec@blackhole.kfki.hu, kadlec@sunserv.kfki.hu
PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : KFKI Research Institute for Particle and Nuclear Physics
H-1525 Budapest 114, POB. 49, Hungary
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: NAT performance
2005-05-13 9:57 ` Jozsef Kadlecsik
2005-05-13 10:14 ` Jozsef Kadlecsik
@ 2005-05-13 10:18 ` Christophe SUIRE
1 sibling, 0 replies; 11+ messages in thread
From: Christophe SUIRE @ 2005-05-13 10:18 UTC (permalink / raw)
To: Jozsef Kadlecsik; +Cc: netfilter
No i don't change the value : 65528
But my test is to receive 50Mo of data, so the conntrack is
established only one time for each client .. so i should have only
100 conntracking entries
Thx.
--
Christophe Suire
Le 13 mai 05 à 11:57, Jozsef Kadlecsik a écrit :
> On Fri, 13 May 2005, Christophe SUIRE wrote:
>
>
>> A great paper !
>> But i have done some bandwidth tests which is quiet different ..
>> I know that NAT *is* expensive .. but i'm surprise that there no
>> bandwidth difference between 20 client and 100 client.
>> So i would like to understand why this limit ?
>>
>
> Sorry, but I have to ask: don't you hit the limit of ip_conntrack_max?
>
> Best regards,
> Jozsef
> -
> E-mail : kadlec@blackhole.kfki.hu, kadlec@sunserv.kfki.hu
> PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
> Address : KFKI Research Institute for Particle and Nuclear Physics
> H-1525 Budapest 114, POB. 49, Hungary
>
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: NAT performance
2005-05-13 10:14 ` Jozsef Kadlecsik
@ 2005-05-13 10:19 ` Christophe SUIRE
0 siblings, 0 replies; 11+ messages in thread
From: Christophe SUIRE @ 2005-05-13 10:19 UTC (permalink / raw)
To: Jozsef Kadlecsik; +Cc: netfilter
You can bind on ip address so ip alias are used ..
-b <local address> Bind to local address/interface
--
Christophe Suire
Le 13 mai 05 à 12:14, Jozsef Kadlecsik a écrit :
> On Fri, 13 May 2005, Jozsef Kadlecsik wrote:
>
>
>> On Fri, 13 May 2005, Christophe SUIRE wrote:
>>
>>
>>> A great paper !
>>> But i have done some bandwidth tests which is quiet different ..
>>> I know that NAT *is* expensive .. but i'm surprise that there no
>>> bandwidth difference between 20 client and 100 client.
>>> So i would like to understand why this limit ?
>>>
>>
>> Sorry, but I have to ask: don't you hit the limit of
>> ip_conntrack_max?
>>
>
> Probably not. But as far as I see, you cannot specify the source IP
> address at tptest. Are you sure the IP address aliases were used at
> all?
>
> Best regards,
> Jozsef
> -
> E-mail : kadlec@blackhole.kfki.hu, kadlec@sunserv.kfki.hu
> PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
> Address : KFKI Research Institute for Particle and Nuclear Physics
> H-1525 Budapest 114, POB. 49, Hungary
>
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: NAT performance
2005-05-13 9:22 ` Jozsef Kadlecsik
2005-05-13 9:51 ` Christophe SUIRE
@ 2005-05-13 11:52 ` Feizhou
1 sibling, 0 replies; 11+ messages in thread
From: Feizhou @ 2005-05-13 11:52 UTC (permalink / raw)
To: netfilter
Jozsef Kadlecsik wrote:
> On Fri, 13 May 2005, Christophe SUIRE wrote:
>
>
>>This not a problem with the network card, because when i do the test
>>with only firewall routing i have a total bandwidth used near to
>>500Mbit/s.
>>But when i add an SNAT translation for each network (10) the total
>>bandwidth used is near 170Mbit/s.
>>So why this important difference without an with NAT ??
>
>
> NAT *is* expensive. Have a look at the paper on netfilter performance
> tests and comparisons at http://people.netfilter.org/kadlec/nftest.pdf
the ip_conntrack module sucks. Lovely cpu chewer.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2005-05-13 11:52 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-12 21:24 NAT performance Christophe SUIRE
2005-05-13 0:03 ` Taylor, Grant
2005-05-13 7:16 ` Christophe SUIRE
[not found] ` <Pine.LNX.4.60.0505130423320.5558@darkstar.sysinfo.com>
2005-05-13 8:33 ` Christophe SUIRE
2005-05-13 9:22 ` Jozsef Kadlecsik
2005-05-13 9:51 ` Christophe SUIRE
2005-05-13 9:57 ` Jozsef Kadlecsik
2005-05-13 10:14 ` Jozsef Kadlecsik
2005-05-13 10:19 ` Christophe SUIRE
2005-05-13 10:18 ` Christophe SUIRE
2005-05-13 11:52 ` Feizhou
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox