Re: grep speed on Opteron vs P4

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

 



T. Horsnell wrote:
I'm seeing huge discrepancies in grep speed between
my Opteron box and P4 boxes.

The Opteron box:
----------------

Dual Opteron 248, 2.2GHz, 1MB cache, 8GB memory, RHEL4
ls1_tsh> uname -a
Linux ls1.lmb.internal 2.6.9-22.0.1.ELsmp #1 SMP Tue Oct 18 18:39:02 EDT 2005 x86_64 x86_64 x86_64 GNU/Linux
ls1_tsh> grep -V
grep (GNU grep) 2.5.1


grepping thro an 800 MB file:

ls1_tsh> time grep rubbishrubbish /tshgrp0/tsh/junkjunk
41.618u 1.263s 0:43.30 99.0%    0+0k 0+0io 0pf+0w
ls1_tsh> time grep rubbishrubbish /tshgrp0/tsh/junkjunk
41.675u 1.477s 0:43.54 99.0%    0+0k 0+0io 0pf+0w

ls1_tsh> ls -l  /tshgrp0/tsh/junkjunk
-rw-r--r--  1 tsh tsh 869243540 Sep  5 13:13 /tshgrp0/tsh/junkjunk

I'm certain the file is all stored in cache during this, and
that no disk accesses are taking place, because:
1. 'top' shows grep at 99.9% cpu
2. iostat on the disk in question shows zero activity.

The P4 box:
-----------

Monocore P4, 3.4GHz, 1MB cache, 2GB memory, FC3.
fm22_tsh> uname -a
Linux fm22.lmb.internal 2.6.11-1.35_FC3 #1 Mon Jun 13 00:52:08 EDT 2005 i686 i686 i386 GNU/Linux
fm22_tsh> grep -V
grep (GNU grep) 2.5.1


fm22_tsh> time grep rubbishrubbish /scr0/tsh/junkjunk
0.272u 0.318s 0:00.59 98.3%     0+0k 0+0io 0pf+0w
fm22_tsh> time grep rubbishrubbish /scr0/tsh/junkjunk
0.311u 0.281s 0:00.59 100.0%    0+0k 0+0io 0pf+0w

fm22_tsh> ls -l /scr0/tsh/junkjunk
-rw-r--r--  1 tsh users 869243540 Sep  5 14:29 /scr0/tsh/junkjunk


This is indicating that grep on the Opteron is *forty* times
slower than on the P4. Any ideas why this might be?
64-bit nasties in grep? Has anyone else seen this?

Cheers,
Terry


I find it hard to believe that any proessor could really grep an 800MB file in 1/4 of a second. I think your P4 system is lying to you.

For example, grepping a 600MB RHEL CD iso I get the following figures:

2.8GHz Pentium 4:
real    0m20.531s
user    0m17.138s
sys     0m0.934s

2.6GHz Opteron 852:
real    0m9.858s
user    0m9.415s
sys     0m0.412s

2.66GHz Xeon:
real    0m18.545s
user    0m17.559s
sys     0m0.970s

Are you sure that the P4 system is really looking at the same file, and is successfully grepping the entire contents? It doesn't look like it is to me.

--
Nigel Wade, System Administrator, Space Plasma Physics Group,
            University of Leicester, Leicester, LE1 7RH, UK
E-mail :    nmw@xxxxxxxxxxxx
Phone :     +44 (0)116 2523548, Fax : +44 (0)116 2523555


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux