Re: Developing Proxy Server - Don't have enough speed
From: David Schwartz (davids_at_webmaster.com)
Date: 05/03/03
- Previous message: David Schwartz: "Re: threads vs. processes"
- In reply to: Jignesh: "Developing Proxy Server - Don't have enough speed"
- Next in thread: Jignesh: "Re: Developing Proxy Server - Don't have enough speed"
- Reply: Jignesh: "Re: Developing Proxy Server - Don't have enough speed"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Sat, 3 May 2003 14:16:00 -0700
"Jignesh" <tosc8@yahoo.co.in> wrote in message
news:a4f50e86.0305030401.6a5d1556@posting.google.com...
> We are developing transparant proxy server on FreeBSD 4.7
> Problem
> -- we are testing speed of Network Address Translation operation which
> is about 7 KB/S which is extreamly slow.
> -- we have configure SQUID proxy server to mesure speed of internet
> which is about 700 KB/S
> -- Earlier we thought that less speed is because of LIBNET Libaray so
> that we remove everything concern to LIBNET & used SOCKET APIs only.
> -- we have tested same code on LINUX 7.1 which is giving speed of
> about 300 KB/S which is quite reasonable.
>
> please suggest any solution so that speed of Network Address
> Translation can be increase.
You have to figure out why it's slow before you can make it faster.
Without seeing your code, there's no way to know. Try profiling it and
figure out what the problem is.
Is the CPU maxed? If yes, figure out what the CPU is busy doing and then
try to optimize that. If not, figure out why not -- what is your process
waiting for?
Sometimes 'strace' or 'ktrace' is useful to figure out where the process
is spending its time. If it's maxed in kernel CPU, what kernel call is it
spinning on? If it's not using the CPU, is it blocked in sleep? select?
what?
You need to figure it out. Maybe the Hash/Map/Vector implementation
you're using is incredibly bad for the way you're using it. Who knows.
DS
- Previous message: David Schwartz: "Re: threads vs. processes"
- In reply to: Jignesh: "Developing Proxy Server - Don't have enough speed"
- Next in thread: Jignesh: "Re: Developing Proxy Server - Don't have enough speed"
- Reply: Jignesh: "Re: Developing Proxy Server - Don't have enough speed"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]