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

Duane Whitty duane at nofroth.com
Thu Feb 8 20:31:15 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
> 
> 
For testing purposes I'd recommend generating the random text ahead of
time and thereby having the same input for the test on both platforms.

Best Regards,
Duane

-- 
Duane Whitty
duane at nofroth.com




More information about the ubuntu-users mailing list