Bugzilla will be upgraded to version 5.0 on December 2, 2018. The outage period for the upgrade will start at 0:00 UTC and have a duration of 12 hours
Bug 90956 - Severe performance problem in grep .
Severe performance problem in grep .
Status: CLOSED DUPLICATE of bug 69900
Product: Red Hat Linux
Classification: Retired
Component: grep (Show other bugs)
All Linux
high Severity high
: ---
: ---
Assigned To: Tim Waugh
Mike McLean
Depends On:
  Show dependency treegraph
Reported: 2003-05-15 15:12 EDT by bmisener
Modified: 2006-02-21 13:53 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-02-21 13:53:03 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description bmisener 2003-05-15 15:12:47 EDT
Description of problem:

Performance EXTREAMLY slow in grep and egrep . Have file :
-rw-rw-r--    1 bryant   bryant    9152309 May 15 13:29 total_hash_all_env_log
with 136595 lines of 67 charagers / line. 
Running grep prd1dhi /tmp/total_hash_all_env_log | wc -l   - takes about 
5 min 42 seconds. Just a wc -l /tmp/....  takes about 1-2 seconds.

If I run a cat /tmp/total_hash_all_env_log | perl -e 'while ( <> ) { 
 print if /prd1dhi/ ;} ' | wc -l   takes about 3 seconds.

If we just do a  time cat /tmp/total_hash_all_env_log >/dev/null this takes 
only 0.08 seconds..

There are 45549 matching lines in the file.

This file is examined often... and 5 minutes is ridiculous. On a redhat 6.2
system that we have it takes about 3 seconds.

We have tried this on different machines with RedHat 9.0 installed on them, it
is the same on all...

Version-Release number of selected component (if applicable):

grep if from grep-2.5.1-7 .

How reproducible:

100% so far.

Steps to Reproduce:
1. Run commands above - with time if desired....
Actual results:

The results are correct as far as the number of lines its just takes 114 time
longer to get the answer.

Expected results:

Additional info:
Comment 1 Peter van Egdom 2003-05-15 16:51:28 EDT
This is a known bug (UTF-8 processing is much slower).
See bug 69900.

Try "export LC_ALL=C" before running grep.
Comment 2 Tim Waugh 2003-05-15 17:55:53 EDT

*** This bug has been marked as a duplicate of 69900 ***
Comment 3 Red Hat Bugzilla 2006-02-21 13:53:03 EST
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.