[pptp-server] PPTP scalability?

Neale Banks neale at lowendale.com.au
Thu Aug 23 22:58:51 CDT 2001


On Thu, 23 Aug 2001, Jamin Collins wrote:

> matt at prosapia.com [mailto:matt at prosapia.com] wrote:
> > Does anyone know how well PPTP scales? 
> 
> I assume you are refering to the PoPToP implimentation of PPTP for linux.
> If so, I seem to recall that there is a limit in the code currently for 100
> connections.  However, indications are that it is simply a limit in how
> connections are tracked.  That is to say that if the tracking/allocation
> code were adjusted to not have a hardcoded 100 limitation in the algorithm
> that the rest of the PoPToP implimentation would still work.

Would you be refering to the limit of 100 ppp devices?  That's in
linux/net/core/dev.c and doesn't appear to be exclusive to ppp devices -
snippet from 2.4.6:

----------------------------------8<----------------------------------
/**
 *      dev_alloc_name - allocate a name for a device
 *      @dev: device 
 *      @name: name format string
 *
 *      Passed a format string - eg "lt%d" it will try and find a suitable
 *      id. Not efficient for many devices, not called a lot. The caller
 *      must hold the dev_base or rtnl lock while allocating the name and
 *      adding the device in order to avoid duplicates. Returns the number
 *      of the unit assigned or a negative errno code.
 */

int dev_alloc_name(struct net_device *dev, const char *name)
{
        int i;
        char buf[32];

        /*
         *      If you need over 100 please also fix the algorithm...
         */
        for (i = 0; i < 100; i++) {
                sprintf(buf,name,i);
                if (__dev_get_by_name(buf) == NULL) {
                        strcpy(dev->name, buf);
                        return i;
                }
        }
        return -ENFILE; /* Over 100 of the things .. bail out! */
}
----------------------------------8<----------------------------------

This looks like it would "work" if you s/100/200/ but doing a serial
search for a free device like that is not a Good Idea.  The key comment is
"Not efficient for many devices" - with the implication that "many" is
approx >=100.

HTH
Neale (who's sure he's posted this before).




More information about the pptp-server mailing list