Re: Performance of netns with sysfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Guenter Roeck <groeck@xxxxxxxxxxx> writes:

> There are two key elements affecting performance when creating large
> numbers of interfaces:
> - full_name_hash() doesn't do a good job in selecting hash buckets
> - sysfs uses a linked list to store directory entries, and strcmp() to
> compare entries.
>
> The sysfs problem may be solved with Eric's sysfs upcoming changes; if
> not, there are (at least) two ways to improve sysfs performance: 

I have not addressed the slowdown problem.  But it is good to hear
that it exists and that people care.  I thought sysfs was going to
slow things down.

My immediate goal is to reduce the locking complexity to that found
within /proc.

> 1) store a name hash with each entry, and compare the hash result before
> comparing the entire name
> 2) create a per-directory hash table.
>
> full_name_hash() can be improved by replacing the hash, for example as
> follows. 
> Old:
> 	return (prevhash + (c << 4) + (c >> 4)) * 11;
> New:
> 	return (prevhash + c) * 41;

At least with the sanity checking turned on.  sysctl will also have
slowdowns that are more significant than sysfs when creating network
devices.  So that should be addressed as well.

Eric
_______________________________________________
Containers mailing list
Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/containers

[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux