Bug 106417 - grep is very slow
Summary: grep is very slow
Keywords:
Status: CLOSED DUPLICATE of bug 69900
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: grep
Version: 9
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-10-06 22:10 UTC by Justin Gullingsrud
Modified: 2007-04-18 16:58 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-02-21 18:58:59 UTC
Embargoed:


Attachments (Terms of Use)

Description Justin Gullingsrud 2003-10-06 22:10:26 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/85.7 (KHTML, like Gecko) Safari/85.5

Description of problem:
grep runs pathologically slowly on both uniprocessor and smp Intel machines when the file contains many lines with a match on the pattern.   

Version-Release number of selected component (if applicable):
grep-2.5.1-7, kernel-2.4.20-20.9, glibc-2.2.5-34

How reproducible:
Always

Steps to Reproduce:
time grep " " /etc/init.d/functions > /dev/null

Actual Results:  0.14 seconds on a dual 2.4GHz P4.

Expected Results:  0.01 seconds or less, as on RedHat 7.3

Additional info:

This takes 0.68 seconds on a 500 MHz PIII, 0.14 seconds on a dual 2.4 GHz P4.  An Athlon running RedHat 7.3, kernel-2.4.18-10, and glibc-2.2.5-34 does not suffer from this problem.  Using grep-2.5.1-1 has the same problem.  The time scales with file size.

Comment 1 Tim Waugh 2003-10-07 08:32:08 UTC
Known issue.  See the grep-2.5.1-gofast.patch in the source rpm for how far I
got with it before giving up and reporting it upstream.

*** This bug has been marked as a duplicate of 69900 ***

Comment 2 Red Hat Bugzilla 2006-02-21 18:58:59 UTC
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.


Note You need to log in before you can comment on or make changes to this bug.