Re: [Patch][RFC] Disabling per-tgid stats on task exit in taskstats

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Andrew Morton wrote:
>On Fri, 23 Jun 2006 13:14:41 -0400
>Shailabh Nagar <[email protected]> wrote:
>
>  
>>The results show that differential between tgid on and off
>>starts becoming significant once the exit rate crosses roughly 1000
>>threads/second. Below that exit rate, the difference is negligible.
>>Above it, the difference starts climbing rapidly.
>>
>>So I guess the question is whether this rate of exit is representative
>>enough of real life to warrant making any more changes to the existing
>>patchset, beyond the locking changes in 2. above.
>>
>>>From my limited experience, I think this is too high an exit rate
>>to be worrying about overhead.
>>
>>    
>
>1000/sec isn't terribly high.  CGI servers, shell scripts.
>
>And kernel development ;) A `pushpatch 1500' here does 992 fork/exec/exit
>per second.
>
>  
>>        %ovhd of tgid on over off
>>        (higher is worse)
>>
>>Exit     User     Sys     Elapsed
>>Rate     Time     Time    Time
>>
>>2283      25.76  649.41   -0.14
>>1193     -10.53   88.81   -0.12
>>963      -11.90    3.28   -0.10
>>806       -8.54   -0.84    0.16
>>694       -4.41    2.38    0.03
>>    
>
>Oh wow.  Something's gone quadratic there.
>  
It was due to a loop in fill_tgid() when per-TG stats
data are assembled for netlink:
        do {
                rc = delayacct_add_tsk(stats, tsk);
                if (rc)
                        break;

        } while_each_thread(first, tsk);

and it is executed inside a lock.
Fortunately single threaded appls do not hit this code.

- jay

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux