[OpenVPN home] [Date Prev] [Date Index] [Date Next]
[OpenVPN mailing lists] [Thread Prev] [Thread Index] [Thread Next]
Google
 
Web openvpn.net

Re: [Openvpn-users] Urgent: Limitation to 100 virtual tunnel dev ices??


  • Subject: Re: [Openvpn-users] Urgent: Limitation to 100 virtual tunnel dev ices??
  • From: Torge Szczepanek <openvpn-users@xxxxxxxxxxxxx>
  • Date: Fri, 2 Jul 2004 14:12:23 +0200

On Friday 02 July 2004 10:59, Daniel Berger wrote:

> > -   for (i = 0; i < 100; i++) {
> > +   for (i = 0; i < 1000; i++) {
> >             snprintf(buf,sizeof(buf),name,i);
> >             if (__dev_get_by_name(buf) == NULL) {
> >                     strcpy(dev->name, buf);

Performance is going to be bad. A hashed device lookup is a better idea. I ran 
some test with many devices and network load. Without a hashed device lookup 
you will get performance problems when going to more than about 250 devices 
and network traffic.

As I posted on openvpn-devel I have a patch available that will introduce a 
Fast (hashed) device lookup for kernel 2.4. This was written by Ben Greer for 
a VLAN implementation.

Since some people already requested this I put it up on my webpage. You can 
find it here http://www.szczepanek.de/linux/

A linux distro including this patch is Adamantix. www.adamantix.org

> How is this with Kernel 2.6?
> I checked the source of 2.6.7, but could'nt find this codefragment in
> /net/core/dev.c
> Anyone knows the limint in 2.6?

This changed somewhere in the 2.6 tree. I didn't really check in which 
version, but it seems a hashed lookup code was also implemented there.

I think there is no real limit. Performance might be tuned by modifying

#define NETDEV_HASHBITS 8

but I didn't review the new kernel code in detail so I might be wrong on that.


____________________________________________
Openvpn-users mailing list
Openvpn-users@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/openvpn-users