mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Can I reduce CPU use of conntrack/masq?
@ 2005-11-02 19:50 Steve Snyder
  2005-11-02 20:23 ` Antonio Vargas
  0 siblings, 1 reply; 4+ messages in thread
From: Steve Snyder @ 2005-11-02 19:50 UTC (permalink / raw)
  To: Linux Kernel Mailing List

Hello.

I am working on what amounts to a Ethernet to Ultra-Wide Band (UWB) 
converter box.  Packets are simply routed from 1 interface to 
another.

This box is based on an ARM7TDMI CPU, running Linux 2.4.26, and the 
network throughput of the box is CPU-limited.  How limited?  The 
100Mbps/FD Ethernet can do no better than 35Mbps.

I've discovered that I can improve Ethernet throughput by about %20 by 
removing the the conntrack/masq support from the kernel.  The removal 
is good only as a test, though, since I need this functionality to 
move the packets between interfaces.  

This is the relevant config:

CONFIG_IP_NF_CONNTRACK=y
CONFIG_IP_NF_IPTABLES=y
CONFIG_IP_NF_NAT=y
CONFIG_IP_NF_NAT_NEEDED=y
CONFIG_IP_NF_TARGET_MASQUERADE=y

Enabled at boot time like this:

/sbin/iptables -t nat -A POSTROUTING -o uwb0 -j MASQUERADE
echo "1" > /proc/sys/net/ipv4/ip_forward

I wonder if I can improve conntrack/masq performance at the expense of 
flexibility.  This will be a closed system, with simple and static 
routing.  Are there any trade-offs I can make to sacrifice unneeded 
flexibility in routing for reduced CPU utilization in conntrack/masq?

Thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Can I reduce CPU use of conntrack/masq?
  2005-11-02 19:50 Can I reduce CPU use of conntrack/masq? Steve Snyder
@ 2005-11-02 20:23 ` Antonio Vargas
  2005-11-02 20:51   ` Steve Snyder
  0 siblings, 1 reply; 4+ messages in thread
From: Antonio Vargas @ 2005-11-02 20:23 UTC (permalink / raw)
  To: Steve Snyder; +Cc: Linux Kernel Mailing List

On 11/2/05, Steve Snyder <R00020C@freescale.com> wrote:
> Hello.
>
> I am working on what amounts to a Ethernet to Ultra-Wide Band (UWB)
> converter box.  Packets are simply routed from 1 interface to
> another.
>
> This box is based on an ARM7TDMI CPU, running Linux 2.4.26, and the
> network throughput of the box is CPU-limited.  How limited?  The
> 100Mbps/FD Ethernet can do no better than 35Mbps.
>
> I've discovered that I can improve Ethernet throughput by about %20 by
> removing the the conntrack/masq support from the kernel.  The removal
> is good only as a test, though, since I need this functionality to
> move the packets between interfaces.
>
> This is the relevant config:
>
> CONFIG_IP_NF_CONNTRACK=y
> CONFIG_IP_NF_IPTABLES=y
> CONFIG_IP_NF_NAT=y
> CONFIG_IP_NF_NAT_NEEDED=y
> CONFIG_IP_NF_TARGET_MASQUERADE=y
>
> Enabled at boot time like this:
>
> /sbin/iptables -t nat -A POSTROUTING -o uwb0 -j MASQUERADE
> echo "1" > /proc/sys/net/ipv4/ip_forward
>
> I wonder if I can improve conntrack/masq performance at the expense of
> flexibility.  This will be a closed system, with simple and static
> routing.  Are there any trade-offs I can make to sacrifice unneeded
> flexibility in routing for reduced CPU utilization in conntrack/masq?

Hmmm... totally untested and don't know the details of UWB but...
can't you simply ether-bridge the interfaces instead of masquerading?
It should need less CPU


> Thanks.
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>


--
Greetz, Antonio Vargas aka winden of network

http://wind.codepixel.com/
windNOenSPAMntw@gmail.com
thesameasabove@amigascne.org

Every day, every year
you have to work
you have to study
you have to scene.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Can I reduce CPU use of conntrack/masq?
  2005-11-02 20:23 ` Antonio Vargas
@ 2005-11-02 20:51   ` Steve Snyder
  2005-11-02 21:36     ` Stephen Hemminger
  0 siblings, 1 reply; 4+ messages in thread
From: Steve Snyder @ 2005-11-02 20:51 UTC (permalink / raw)
  To: Antonio Vargas; +Cc: Linux Kernel Mailing List

On Wednesday 02 November 2005 15:23, Antonio Vargas wrote:
> On 11/2/05, Steve Snyder <R00020C@freescale.com> wrote:
[snip]
> > I wonder if I can improve conntrack/masq performance at the expense of
> > flexibility.  This will be a closed system, with simple and static
> > routing.  Are there any trade-offs I can make to sacrifice unneeded
> > flexibility in routing for reduced CPU utilization in conntrack/masq?
> 
> Hmmm... totally untested and don't know the details of UWB but...
> can't you simply ether-bridge the interfaces instead of masquerading?
> It should need less CPU

Hmm...  I'm not familiar with ether-bridge, and Google turns up only
commercial products and BSD references.

Pointer to info, please?

Thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Can I reduce CPU use of conntrack/masq?
  2005-11-02 20:51   ` Steve Snyder
@ 2005-11-02 21:36     ` Stephen Hemminger
  0 siblings, 0 replies; 4+ messages in thread
From: Stephen Hemminger @ 2005-11-02 21:36 UTC (permalink / raw)
  To: linux-kernel

On Wed, 2 Nov 2005 15:51:52 -0500
Steve Snyder <R00020C@freescale.com> wrote:

> On Wednesday 02 November 2005 15:23, Antonio Vargas wrote:
> > On 11/2/05, Steve Snyder <R00020C@freescale.com> wrote:
> [snip]
> > > I wonder if I can improve conntrack/masq performance at the expense of
> > > flexibility.  This will be a closed system, with simple and static
> > > routing.  Are there any trade-offs I can make to sacrifice unneeded
> > > flexibility in routing for reduced CPU utilization in conntrack/masq?
> > 
> > Hmmm... totally untested and don't know the details of UWB but...
> > can't you simply ether-bridge the interfaces instead of masquerading?
> > It should need less CPU
> 
> Hmm...  I'm not familiar with ether-bridge, and Google turns up only
> commercial products and BSD references.

It in the kernel already! Look at 
	http://linux-net.osdl.org/index.php/Bridge
For more info

-- 
Stephen Hemminger <shemminger@osdl.org>
OSDL http://developer.osdl.org/~shemminger

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-11-02 21:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-02 19:50 Can I reduce CPU use of conntrack/masq? Steve Snyder
2005-11-02 20:23 ` Antonio Vargas
2005-11-02 20:51   ` Steve Snyder
2005-11-02 21:36     ` Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®