Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 04 Feb 2008 11:54:54 +0100
From:      Kris Kennaway <kris@FreeBSD.org>
To:        Stefan Lambrev <stefan.lambrev@moneybookers.com>
Cc:        freebsd-hackers@freebsd.org, Ivan Voras <ivoras@freebsd.org>
Subject:   Re: gettimeofday() in hping
Message-ID:  <47A6EEFE.8040809@FreeBSD.org>
In-Reply-To: <47A6EA28.6000902@moneybookers.com>
References:  <4795CC13.7080601@moneybookers.com>	<4795FE54.9090606@moneybookers.com>	<86lk6i0vzk.fsf@ds4.des.no>	<479605E2.6070709@moneybookers.com>	<fn5c7u$i7e$2@ger.gmane.org>	<47964356.6030602@moneybookers.com>	<479647FB.3070909@FreeBSD.org>	<47970EE2.5000400@moneybookers.com>	<fn7evj$smv$1@ger.gmane.org>	<479754E6.1060101@moneybookers.com>	<9bbcef730801230802n5c52832bk60c6afc47be578f4@mail.gmail.com>	<47976AD4.3020203@moneybookers.com>	<47A62EE8.2000700@FreeBSD.org> <47A62F1D.8070507@FreeBSD.org> <47A639B5.2020909@FreeBSD.org> <47A6EA28.6000902@moneybookers.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Stefan Lambrev wrote:
> Greetings,
> 
> Kris Kennaway wrote:
>> Kris Kennaway wrote:
>>
>>>> Fixing all of the above I can send at about 13MB/sec (timecounter is 
>>>> not relevant any more).  The CPU is spending about 75% of the time 
>>>> in the kernel, so
>>>              that is the next place to look. [hit send too soon]
>>
>> Actually 15MB/sec once I disable all kernel debugging.  This is 
>> identical to Linux 2.6.24 on the same hardware.  The patch I use to 
>> fix hping brain-damage is attached.
>>
>> Kris
> Indeed this patch highly improve results (x2) under FreeBSD. On my 
> hardware the max speeds under FreeBSD i still little slower compared to 
> Linux (something like 19 vs 19.5 MB/s)
> but the speed is quite more stable under FreeBSD (under linux the 
> average speed seems slower)
> 
> I didn't tested the patch under linux but will do soon.
> Thanks for the help :)
> 
> BTW 262144 is little high as this match the default value in FreeBSD, I 
> tested with twice smaller buffer and do not see performance lost.
> Kris if you do not mind I'll write to hping developers to adopt this 
> patch, and if no response from them I can try to reach the port 
> maintainer, so we have this patched in ports?
> 

My patch is a bit crude, because I didnt have the courage to digest the 
entire structure of the code, so it may be slightly wrong with respect 
to other operating modes (the #if 0 part is wrong, but that code needs 
to be rewritten). Some version of it should be included in the software, 
but perhaps after renaming the patch file ;-)

Kris



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?47A6EEFE.8040809>