New answers tagged

0

Performance is complicated. The only way to be sure is to benchmark on a real system with a real load. Piping multiple utilities definitely has a cost. Compared with string operations, this cost is very high. However, if the amount of data is large enough, a pipe solution can be faster, because it may allow specialized tools to do their job faster and it ...


2

Sometimes it is just easier to profile things: I've created a sample input file: aaaaa:bbbbb:ccccc aaaaa:bbbbb:ccccc aaaaa:bbbbb:ccccc aaaaa:bbbbb:ccccc field:bbbbb:ccccc aaaaa:bbbbb:ccccc aaaaa:bbbbb:ccccc aaaaa:bbbbb:ccccc aaaaa:bbbbb:ccccc shell script 'a.sh': #!/bin/bash for i in `seq 1 1000`; do cat test.dat | grep ^field | head -n1 | sed ...


2

The syntax for find is: find [-H] [-L] [-P] [-D debugopts] [-Olevel] [path...] [expression] In your case -iname and -type are both expressions. So, there is no problem with using one before another. From Description: GNU find searches the directory tree rooted at each given file name by evaluating the given expression from left to right, according to ...


1

Well, I once had a similar problem with yours. I found that your "wa" is high, you could use iostat -x 1 to check whether your disk util is high, if so, it means that your disk is quite busy. Check that whether some other processes are writing to disk continuously. For simpility, use vmstat 1 to check whether b is high or r < b. That indicates ...


2

Well it could have been that the mirror had problems, it happens some times like this reddit discussion between users who had buggy mirrors and you should report when it happens to mirrors@debian.org and they will get to you right away. You could change the mirrors in your /etc/apt/sources.list to mirrors nearer to where you live from this site ...


0

Seems like there is no real alternative to the gnu time command. So, in the end I installed just that. On OS X gnu-time can be installed with homebrew: brew install gnu-time. Thereafter CPU utilization for a specific command can be measured using gtime <command>. A test shows that my program is indeed running concurrently: 1.73user 0.13system ...



Top 50 recent answers are included