• Wyes Karny's avatar
    tools/power turbostat: Increase the limit for fd opened · 3ac1d14d
    Wyes Karny authored
    When running turbostat, a system with 512 cpus reaches the limit for
    maximum number of file descriptors that can be opened. To solve this
    problem, the limit is raised to 2^15, which is a large enough number.
    
    Below data is collected from AMD server systems while running turbostat:
    
    |-----------+-------------------------------|
    | # of cpus | # of opened fds for turbostat |
    |-----------+-------------------------------|
    | 128       | 260                           |
    |-----------+-------------------------------|
    | 192       | 388                           |
    |-----------+-------------------------------|
    | 512       | 1028                          |
    |-----------+-------------------------------|
    
    So, the new max limit would be sufficient up to 2^14 cpus (but this
    also depends on how many counters are enabled).
    Reviewed-by: default avatarDoug Smythies <dsmythies@telus.net>
    Tested-by: default avatarDoug Smythies <dsmythies@telus.net>
    Signed-off-by: default avatarWyes Karny <wyes.karny@amd.com>
    Signed-off-by: default avatarLen Brown <len.brown@intel.com>
    3ac1d14d
turbostat.c 180 KB