RedHat 7.0 sed speed is slow

Tony Hammitt tony at speedscript.com
Mon Jul 9 22:36:29 CDT 2001


It could have to do with the memory configuration of the machine, I've noticed
that SCO runs in less memory (and had far less features) than Linux, so you can
run into swap a lot sooner with Linux.  It will handle it more effectively, but
it could easily slow things down.

Can you check the memory usage using 'ps aux' or 'top'?  It could also be as
a result of disk activity, but Linux is lots faster than SCO at that.

If it's the memory, consider getting more.  It's down to $20/128MB at certain
places.  It would pay for itself with one hour of your time saved...

It seems like a lot for sed to be taking.  Perhaps a better text processing
language would be in order?  Perl is capable of being many times faster than
sed, and C is faster still.  If this is a performance critical application,
it may be worth your time to rewrite it.

HTH,

	Tony

"Woo, David" wrote:
> 
> I'm transferring a shell application from SCO 5.0.5 to RedHat 7.0.  Of all
> the things that I thought I
> would have no problems with, I never thought that the speed of the sed
> command on SCO would
> run 4 times faster than the one on RedHat!  The original sed on SCO had been
> running slowly - so I
> had compiled the GNU version of sed on SCO - and had reduced the execution
> time from 3 hours
> to 40 minutes.
> 
> Now I have transferred the exact same script that calls sed extensively from
> SCO to the standard,
> stock RedHat 7.0 distribution - I find that the RedHat sed is running 4
> times slower than than the
> SCO GNU version of sed - just like the original SCO sed.  Isn't the version
> that comes with RedHat
> the GNU version already?  The RPM reveals that RedHat sed is "sed 3.02-8".
> 
> I'm such a newbie that I don't even know how to update to the latest version
> of sed - and don't
> know if it would help?
> 
> What am I missing?
> 
> TIA.
> David.
> 




More information about the Kclug mailing list