Closed lipzhu closed 1 year ago
Seems reasonable to loop and run tst.sh &
more quickly in parallel.
I wonder if using seq
would be even faster.
for i in $(seq 1 $1); do /bin/sh "$UB_BINDIR/tst.sh" &; done
@gstrauss Thanks for your quick response, in my local test environment, the for seq loop
is slower 8.2% than while with $(())
.
./Run shell1 -c 160
run in below env:
1. Intel ICX server with 160 cpu
2. Kernel 6.0.0-rc6
3. ldd --version: ldd (GNU libc) 2.28
4. gcc --version: gcc (GCC) 8.5.0
5. sh --version: GNU bash, version 4.4.20(1)-release
6. ...
Ok. That's fine. I'll look at this more tomorrow.
BTW, in a non-scientific quick use of 'time', seq
was ~15% faster on my 7-year-old laptop.
merged. thanks!
With the parallel/copy number grows, the cost percentage of
expr $instance + 1
will increase exponentially due to the contention, this will impact the real workload tst.sh trigger speed in thewhile
section.