FIXED SUMMARY quicker than grep

From: Yiannis Kanellopoulos <>
Date: Fri Dec 09 2005 - 08:01:29 EST
I would like to thank JV711, who through his questions pointed out a big
mistake that I made in my summary.
After all the trouble that i had making the script running quicker on
solaris, I tested the tools on debian. (to avoid loading the system
more). As a results the results are faulted!
so here is the problem and the solution (and the new results table):
A large group of non-root users needs to find out information about
customers through ldap. 
ldapservers are pretty loaded as they are, and doing extra calls to them
(searching) increases the load to even more.
so as a quick solution, for simple searches we use an ldif that has been
taken from the ldap every night, and we 'grep' for information through
this file. its simple 1 grep and four seds.
Last summary i had run all the different greps on a non solaris box, and
it showed that agrep was the fastest. Its not true in Solaris though...

Here is the list of the tools that I tested in solaris 9 (sun4u, sparc,

the grep,egrep fgrep are the solaris versions,
the ones with the g infront are the GNU grep versions.
Perl is a quick search with perl described in Unix Power tools (oreily).
gwana is the bourne shell script which formats the output.
ykanello is my username :)

grep gwana ykanello  10.71s user 14.27s system 95% cpu 26.098 total

ggrep gwana ykanello  0.06s user 0.14s system 1% cpu 18.677 total

agrep gwana ykanello  20.52s user 7.79s system 95% cpu 29.545 total

egrep gwana ykanello  18.42s user 13.58s system 96% cpu 33.114 total

fgrep gwana ykanello  30.80s user 7.14s system 96% cpu 39.232 total

gegrep gwana ykanello  1.87s user 6.33s system 43% cpu 18.683 total

gfgrep gwana ykanello  2.04s user 7.15s system 49% cpu 18.688 total

perl  gwana ykanello  21.78s user 7.05s system 96% cpu 29.884 total
sunmanagers mailing list
Received on Fri Dec 9 08:07:14 2005

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:53 EST