lkml.org 
[lkml]   [1996]   [Jun]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: 2.0, loggings, cpu quotas, 2.1 issues, etc.
    > > BUT... opening files in /proc sometimes up to 3 times a second does not
    > > wear well for the system CPU load. A kernel feature would work immensely
    > > better.
    >
    > I appear to be able to open files in /proc a good 50 times a second before
    > its noticed even slightly on the lod average

    Also, if you have a program that opens the same file over and over again, you
    might just consider _keeping_ it open and just doing a lseek() to the start of
    the file..

    Also, programs that open lots of files repeatedly (like top), and can't just
    keep them all open (because the processes change, for example) might want to
    consider doing a 'chdir("/proc");' first, and then use relative names. That
    avoids a filesystem lookup and mount point change. That's not a very big deal,
    but if people feel it's slow, there are these kinds of trivial optimizations
    you can look into..

    Linus


    \
     
     \ /
      Last update: 2005-03-22 13:37    [W:4.106 / U:0.180 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site