tproxy performance
Hi All Any of you aware of any tproxy performance data? Specifically, any extra latency it adds to packet processing (% is fine). Our testing seems to add significant latency (3ms on base 2-3 ms in non transparent proxy mode). Does it make sense? Thanks Ravi
It would be very hard to consider an extra 1ms as a significant extra latency... Anyway Squid must insert some latency on the not-cached request, since it processes the request, and needs time for this. On Monday 13 October 2008 19:28, Ravi Valmikam wrote:
Hi All
Any of you aware of any tproxy performance data? Specifically, any extra latency it adds to packet processing (% is fine).
Our testing seems to add significant latency (3ms on base 2-3 ms in non transparent proxy mode). Does it make sense?
Thanks Ravi
Hi, On h, okt 13, 2008 at 10:28:59 -0400, Ravi Valmikam wrote:
Any of you aware of any tproxy performance data? Specifically, any extra latency it adds to packet processing (% is fine).
Our testing seems to add significant latency (3ms on base 2-3 ms in non transparent proxy mode). Does it make sense?
Could you give us a bit more detailed description of what you measured and how? -- KOVACS Krisztian
This is the setup: There are 3 PCs. 1. Client 2. A custom TCP proxy based on 2.6.24 + tproxy 3. Server All pretty high end machines. Test sequence: Step A. I send a data packet on already established TCP packet. Size is an MTU from machine 1. Step B. Machine 2 receives it and proxies it. Step C. Machine 3 receives it and echoes it back. We measure the on-the-wire time in and out of machine (2). In pure ipforwarding mode on machine 2, we see 2-3 ms latency. In tproxy mode on machine 2, we see 5-6 ms latency (additional 3ms). I hope that clarifies the scenario. Any pointers/help is appreciated. Thanks Ravi On Tue, Oct 14, 2008 at 4:49 AM, KOVACS Krisztian <hidden@sch.bme.hu> wrote:
Hi,
On h, okt 13, 2008 at 10:28:59 -0400, Ravi Valmikam wrote:
Any of you aware of any tproxy performance data? Specifically, any extra latency it adds to packet processing (% is fine).
Our testing seems to add significant latency (3ms on base 2-3 ms in non transparent proxy mode). Does it make sense?
Could you give us a bit more detailed description of what you measured and how?
-- KOVACS Krisztian
On Tue, 2008-10-14 at 09:15 -0400, Ravi Valmikam wrote:
This is the setup:
There are 3 PCs.
1. Client 2. A custom TCP proxy based on 2.6.24 + tproxy 3. Server
All pretty high end machines.
Test sequence:
Step A. I send a data packet on already established TCP packet. Size is an MTU from machine 1. Step B. Machine 2 receives it and proxies it. Step C. Machine 3 receives it and echoes it back.
We measure the on-the-wire time in and out of machine (2).
In pure ipforwarding mode on machine 2, we see 2-3 ms latency.
In tproxy mode on machine 2, we see 5-6 ms latency (additional 3ms).
I hope that clarifies the scenario.
Well proxying in userspace definitely adds overheads over simple packet forwarding: * instead of simple packet forwarding, the packets are processed by the local TCP stack and queued to a socket buffer * the userspace application wakes up if there's traffic, since this is in userspace, it takes some time (remember packet forwarding is all performed in softirq context, whereas the userspace proxies have to react on data stored in a socket buffer by the same softirq contex) * the userspace application copies data from the receiving socket buffer and puts that data in the target socket buffer, that copies the data twice (whereas IP forwarding does not copy packets, except for maybe in the ethernet driver, but that applies to TCP proxies too) So there's plenty of overhead, but that's the price of the increased flexibility you pay for the flexibility that you can do in userspace/proxies. So the latency is not tproxy specific, it's proxying specific. If you want to measure tproxy performance, you should measure the difference between a simple non-transparent proxy and one where tproxy redirects traffic. I doubt there'd be too much of a difference. -- Bazsi
participants (4)
-
Anton
-
Balazs Scheidler
-
KOVACS Krisztian
-
Ravi Valmikam