BSD User's group?

Jeff Kinz jkinz at kinz.org
Sun Jan 15 06:07:01 EST 2006


On Sat, Jan 14, 2006 at 11:58:19PM -0500, Jason Stephenson wrote:
> (On a side note, has anyone noticed that a system running Fedora Core 4 
> feels slower than it did when it was running Red Hat 7.3? I blame 
> changes in the kernel options, but haven't delved too deeply into it. 
> Namely, it seems to take longer when grepping through files. The 
> performance is acceptable for email, though I'm thinking of writing a 
> program to convert the password database to the FreeBSD format so I can 
> switch the server to FreeBSD.)



This is is UTF-8 processing.  If you use a locale without UTF-8 support,
grep goes as fast as normal.  

grep spends more than 80% of the time in the check_multibyte_string
function.  It is as fast as the old version when used without UTF-8:

###################################################################


[root at test log]# export LANG='en_US.UTF-8'
[root at test log]# time grep '^' messages > /dev/null
real    0m3.689s
user    0m3.600s
sys     0m0.080s

[root at test log]# export LANG='en_US'
[root at test log]# time grep '^' messages > /dev/null
real    0m0.004s
user    0m0.000s
sys     0m0.000s

With LANG=en_US.UTF-8, grep is almost a thousand times slower.
###################################################################

One solution: (which has other issues)
export LC_COLLATE=C
export LANG=en_US


-- 
Jeff Kinz, Emergent Research, Hudson, MA.
speech recognition software may have been used to create this e-mail

"The greatest dangers to liberty lurk in insidious encroachment by men
of zeal, well-meaning but without understanding." - Brandeis

To think contrary to one's era is heroism. But to speak against it is
madness. -- Eugene Ionesco



More information about the gnhlug-discuss mailing list