On 06/15/10 15:31, ольга крыжановская wrote:
Solaris getenv() and putenv() do not scale linear and it gets a lot
*worse* above 100 or more variables.
Running libmicro's getenv test case indicates that this is not the case;
performance is linear with size of environment aside from cache effects.
Increasing the size of the environment by a factor of 10 each time
from 100 environment variables to 100000:
: ba...@cyber[114]; : ba...@cyber[110]; bin/getenv -s 100 -D 100 -B 100 -1
prc thr usecs/call samples errors cnt/samp
getenv 1 1 0.10884 8571 0 100
: ba...@cyber[114]; : ba...@cyber[110]; bin/getenv -s 1000 -D 100 -B 100 -1
prc thr usecs/call samples errors cnt/samp
getenv 1 1 0.91209 700 0 100
: ba...@cyber[115]; : ba...@cyber[110]; bin/getenv -s 10000 -D 100 -B 100 -1
prc thr usecs/call samples errors cnt/samp
getenv 1 1 12.37686 62 0 100
: ba...@cyber[116]; : ba...@cyber[110]; bin/getenv -s 100000 -D 100 -B
100 -1
prc thr usecs/call samples errors cnt/samp
getenv 1 1 127.88930 98 0 100
Please note that retrieving a single environment variable out of
100 took about 110 nanoseconds on my desktop - not exactly a long time.
- Bart
--
Bart Smaalders Solaris Kernel Performance
bart.smaald...@oracle.com http://blogs.sun.com/barts
"You will contribute more with mercurial than with thunderbird."
_______________________________________________
opensolaris-arc mailing list
opensolaris-arc@opensolaris.org