grep with --extended-regexp much slower on Ubuntu 16.04

Duane Whitty duane at nofroth.com
Thu Feb 8 21:38:32 UTC 2018


On 18-02-08 12:42 PM, Brian Bird wrote:
> I've noticed Ubuntu 16.04LTS seems to run greps with "-extended-regexp" much slower than Ubuntu 14.04LTS. I can reproduce this on the same hardware simply by re-installing with the relevant operating system.
> 
> Eg. On Ubuntu 14.04
> # openssl rand -out /tmp/random.txt -base64 100000000; time grep --extended-regexp "[0-9]{10}$" /tmp/random.txt
> real    0m0.513s
> user    0m0.474s
> sys     0m0.036s
> 
> On Ubuntu 16.04:
> # openssl rand -out /tmp/random.txt -base64 100000000; time grep --extended-regexp "[0-9]{10}$" /tmp/random.txt
> 
> real    0m20.619s
> user    0m20.587s
> sys     0m0.028s
> 
> Q. Can anyone try the above commands and verify if they have similar problems?
> Q. Can anyone suggest anything that might cause this?
> 
> Any pointers appreciated!
> Thanks
> 
> One of my first questions should have been what kind of OS installation
are you doing, e.g., minimal server install, full blown X with desktop
environment, etc?  I believe to really get solid test results you need
to do a bare minimum install of the OS and preferably be in maintenance
mode before running the test.  To state the obvious, serious testing can
get complicated because it can be difficult to get rid of outside
influences.

Best Regards,
Duane

-- 
Duane Whitty
duane at nofroth.com




More information about the ubuntu-users mailing list