My Linux machine has 16 processors and free memory of 70 GB but when I run an
egrep command, the command is using (checked through the
top command) 100% of CPU and 0.5 of memory:
22391 aime 25 0 22.5g 337m 880 R 100.1 0.5 1094:06 egrep
That means that only 1 out of 16 CPUs are used.
How can I improve the performance here or make my
egrep use more CPUs?
I am actually
grepping in the directory structure which is 40 GB in terms of data size.
The approximate regex is :
egrep -H -i -R -a -o -n ([[:alnum:]_\.]+@[[:alnum:]_\.]*(xyz|abc)\.com) <dir>
Also , since I am running this command through Perl script, can ForkManager help me in this regard ?