Bash instances running in loops get slower over time, as the bgpids data
structure grows. Here is a small patch to alleviate one issue :)
The jobs.c:bgpids data structure is used as a cache for the wait syscall, to
store the status of dead processes, so that scripts can wait on pids even
multip
it is dominated by copying page table entries on fork
user 94.14
sys 657.74
Without patch most time is spent in bgp_* functions
user 1637.16
sys 1337.58
Number of iterations of this busy loop is much higher with the patch too :)
Any feedback much appreciated!
From: John Fremlin
Date: Mond
On 4/15/15, 6:35 PM, "Chet Ramey" wrote:
>On 4/14/15 12:54 AM, John Fremlin wrote:
>> Bash instances running in loops get slower over time, as the bgpids data
>> structure grows. Here is a small patch to alleviate one issue :)
>>
>> The jobs.c:bgpids data
Did some benchmarks, for the while true; do (:) & (:); done simple example
this goes from 215 to 313 iterations/s, and changes sys+user CPU from 152%
to 45%
Any long running bash script will tend to exhibit this issue --
On 4/15/15, 5:59 PM, "John Fremlin" wrote:
>Over tim
On 4/19/15, 5:24 PM, "Chet Ramey" wrote:
>On 4/17/15 4:55 PM, John Fremlin wrote:
>> Did some benchmarks, for the while true; do (:) & (:); done simple
>>example
>> this goes from 215 to 313 iterations/s, and changes sys+user CPU from
>>152%
>>