Linux Netfilter discussions
 help / color / mirror / Atom feed
* Improve queue handler performance
@ 2007-06-14 22:04 Rayed Alrashed
  2007-06-19 14:30 ` Eric Leblond
  0 siblings, 1 reply; 3+ messages in thread
From: Rayed Alrashed @ 2007-06-14 22:04 UTC (permalink / raw)
  To: netfilter

Hello everyone,

I am playing with nf_netlink_queue handler and built an empty handler 
based on "nfqnl_test.c" from the distribution, it just accept all packet 
without any checks at all.

To test its performance I installed Lighttpd on the same machine, and 
used http_load to benchmark the performance.

Without any thing queued to the user space I achieved ~20000K fetches 
per second, but when I enabled user space filtering the performance 
dropped to ~2600 fetches per second.

I used this rule to queue all HTTP traffic to the queue handler:
# iptables -A myhttp -p tcp --dport 80 -j QUEUE

Is this drop in performance normal, and is there any way to improve the 
performance.

Thanks,
Rayed


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

* Re: Improve queue handler performance
  2007-06-14 22:04 Improve queue handler performance Rayed Alrashed
@ 2007-06-19 14:30 ` Eric Leblond
  2007-06-22 10:46   ` Rayed Alrashed
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Leblond @ 2007-06-19 14:30 UTC (permalink / raw)
  To: Rayed Alrashed; +Cc: netfilter

Hi,

Could you send your code I'd like to run it on my platform. I want to
see I I came to the same result and I will try next to optimize
libnetfilter_queue.

In fact, I've done some bench on NuFW and found a similar result. Here's
the article (in french) with some graphs :
http://nufw.org/Tests-de-performance-intensifs-sur.html

BR,

Le vendredi 15 juin 2007 à 01:04 +0300, Rayed Alrashed a écrit :
> Hello everyone,
> 
> I am playing with nf_netlink_queue handler and built an empty handler 
> based on "nfqnl_test.c" from the distribution, it just accept all packet 
> without any checks at all.
> 
> To test its performance I installed Lighttpd on the same machine, and 
> used http_load to benchmark the performance.
> 
> Without any thing queued to the user space I achieved ~20000K fetches 
> per second, but when I enabled user space filtering the performance 
> dropped to ~2600 fetches per second.
> 
> I used this rule to queue all HTTP traffic to the queue handler:
> # iptables -A myhttp -p tcp --dport 80 -j QUEUE
> 
> Is this drop in performance normal, and is there any way to improve the 
> performance.
> 
> Thanks,
> Rayed




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

* Re: Improve queue handler performance
  2007-06-19 14:30 ` Eric Leblond
@ 2007-06-22 10:46   ` Rayed Alrashed
  0 siblings, 0 replies; 3+ messages in thread
From: Rayed Alrashed @ 2007-06-22 10:46 UTC (permalink / raw)
  To: Eric Leblond; +Cc: netfilter

Hi,
> Could you send your code I'd like to run it on my platform.
I will send the code directly to your email, it is basically this file:
libnetfilter_queue-0.0.13/utils/nfqnl_test.c

With printf commented out, and the while loop changed from:
while ((rv = recv(fd, buf, sizeof(buf), 0)) && rv >= 0)
To:
while ( ((rv = recv(fd, buf, sizeof(buf), 0)) && rv >= 0)  || 
(errno==105) )

Looking back to it I don't know why I added this check but it used to 
break the loop after few hundreds of packets.

> In fact, I've done some bench on NuFW and found a similar result. Here's
> the article (in french) with some graphs :
> http://nufw.org/Tests-de-performance-intensifs-sur.html
>   
Unfortunately I don't know french :(

Best regards,
Rayed


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

end of thread, other threads:[~2007-06-22 10:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-14 22:04 Improve queue handler performance Rayed Alrashed
2007-06-19 14:30 ` Eric Leblond
2007-06-22 10:46   ` Rayed Alrashed

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