Re: Why is redhat slow?



ynotssor wrote:


Why don't you make the gzip'd text file available for others to benchmark?


OK, this won't be the exact same file and patterns will be repetitive thus not taking the 10 minutes like on my real data, however the time differences are still highly varied.

It's not limited to just grep/sed either... everything is noticeably slower. Try a wc -l on a file over 200MB and compare the time it takes accross the distro's.

Generate the test file:
###
#!/bin/bash

num=1
>testfile
while [ $num -lt 20665 ] ; do
echo "blah+foo+bar_who:0.01
blah+foo+bar_who:0.05
blah+foo+bar_who:0.09
blah+foo+bar_who:0.02
blah+foo+bar_who:0.03
blah+foo+bar_who:0.04
blah+foo+bar_who:0.10
blah+foo+bar_who:0.15" >> testfile
num=`expr $num + 1`
done
###

This generates a 3.5MB file with 165312 lines.


Here are the tests:

---------
1.2Ghz Celeron 256MB RAM
n01:# cat /etc/slackware-version
Slackware 10.1.0

n01:# time egrep -v \
":$|:0$|0\.0$|:0\.00|0\.01|:0\.$|0.02|0.03|0.04|0.05|0.06|0.07" \
testfile > /dev/null

real 0m0.108s
user 0m0.080s
sys 0m0.020s

----------
1.2Ghz PIII 1GB RAM
g01:# cat /etc/SuSE-release
SuSE Linux 9.3 (i586)
VERSION = 9.3

g01:# time egrep -v \
":$|:0$|0\.0$|:0\.00|0\.01|:0\.$|0.02|0.03|0.04|0.05|0.06|0.07" \
testfile > /dev/null

real 4m32.997s
user 4m32.797s
sys 0m0.149s

----------
2.4Ghz P4 1GB RAM
p01# cat /etc/redhat-release
Red Hat Linux release 9 (Shrike)

p01# time egrep -v \
":$|:0$|0\.0$|:0\.00|0\.01|:0\.$|0.02|0.03|0.04|0.05|0.06|0.07" \
testfile > /dev/null

real 2m54.955s
user 2m51.250s
sys 0m0.160s
.



Relevant Pages

  • Re: Why is redhat slow?
    ... 1.2Ghz Celeron 256MB RAM ... testfile> /dev/null ... sys 0m0.020s ...
    (linux.redhat)
  • Re: Why is redhat slow?
    ... testfile> /dev/null ... sys 0m0.020s ... "Why benchmark with an obsolete RH release and compare it with an mainstream Slackware?" ...
    (linux.redhat)