Which command is faster to search any regex from large filebase? Possible commands are -
- ack
- ag
- pt
- csearch
Which one you would suggest me to go with?
Machine: 8 vCPUs, 30 GB memory
OS: Ubuntu 16.04LTS
Total number of files: 37,24,564
#linuxadmin #devops
-
Show this thread
-
Stats that I finished executing: $ time ~/gopath/bin/pt -l 'Search' ~/mydir real9m26.714s user3m14.100s sys3m20.260s
1 reply 0 retweets 0 likesShow this thread -
$ time csearch -f ~/mydir -n 'Search' real5m0.876s user0m28.276s sys0m14.060s
1 reply 0 retweets 1 likeShow this thread -
$ time rg -c 'Search' ~/mydir real10m55.847s user29m50.364s sys3m21.667s
1 reply 0 retweets 0 likesShow this thread
Replying to @shaharia
That directory is likely so big that it doesn't appear to fit into memory. So for tools line ripgrep, you're mostly just measuring disk read speed. This is where tools like csearch will shine. There is also hound and qgrep in that space.
12:44 PM - 14 Nov 2019
0 replies
0 retweets
0 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.