You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS)
) chokes badly when used on AFS volumes.
By default, it seems AFS fileservers will throttle single clients that make more than 10 failed RPCs in a row by delaying a full 3 seconds (to protect the server from poorly-written clients). Unsurprisingly, this slows rimraf to a crawl, with fairly wide implications for Node projects on AFS volumes given rimraf's popularity. As an example, here's part of an strace log from npm uninstall on my machine (note the timestamps...):
Of course, it would be ideal if the OS itself could deal with this and not hit the server for each of those requests as is already done for some commands like mkdir -- see http://milek.blogspot.com/2014/01/mkdir-performance.html -- though I'm not familiar enough with the ins and outs of filesystems to know if it's possible to do that for rmdir.
Thoughts?
The text was updated successfully, but these errors were encountered:
Incidentally, what disadvantages are there to spawning an rm -rf or rmdir /s /q child process when possible (@isaacs hesitantly brought up the latter in #72)? I don't know the performance implications myself...
Can you please retry with the latest version of rimraf? I believe some recent changes have likely affected this. Happy to reopen if explicit throttling is still something to consider.
The current strategy of trying to
rmdir
first and only usingreaddir
onENOTEMPTY
(seerimraf/rimraf.js
Line 213 in 096b163
By default, it seems AFS fileservers will throttle single clients that make more than 10 failed RPCs in a row by delaying a full 3 seconds (to protect the server from poorly-written clients). Unsurprisingly, this slows rimraf to a crawl, with fairly wide implications for Node projects on AFS volumes given
rimraf
's popularity. As an example, here's part of anstrace
log fromnpm uninstall
on my machine (note the timestamps...):Of course, it would be ideal if the OS itself could deal with this and not hit the server for each of those requests as is already done for some commands like
mkdir
-- see http://milek.blogspot.com/2014/01/mkdir-performance.html -- though I'm not familiar enough with the ins and outs of filesystems to know if it's possible to do that forrmdir
.Thoughts?
The text was updated successfully, but these errors were encountered: