"Simon Riggs" <[EMAIL PROTECTED]> wrote > > Can we do the same for the file descriptors in fd.c? > > Very often the total number of file descriptors is much less than the > maximum, so it would make sense to only maintain the LRU when we are > using more than 50%-75% of the maximum. >
I am not against doing it but AFAIR the LRU file operations is (1) not frequent; (2) the cost is only several CPU circles if we do not run out of fds; (3) the LRU lseek/close/open big cost is still not avoidable when we really run out of fds. So this optimization may be not needed. Or do you have some numbers to show that's a bottleneck for some kind of applications? Regards, Qingqing ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster