Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pnfsmanager: process listings of the same path sequentially, implemen…
…t list message folding Motivation: Multiple batch jobs executing listings of the same directories especially if directories contain many entries quickly exhaust active threads, each thread executing the same listing, denying listing to all other customers and creating significant load on namespace server (and DB). Clients time out and retry creating even more load on dCache. Modification: The problem is solved by implementing PnfsListDirectoryMessage folding and dispatching list requests to multiple queues (number of queues is configurable) based on directory path hashCode. Each queue is served by a single thread. This guarantees that a listing of the same path will be queued to the same queue and only one listing of a unique path can be active. Once listing is complete, the queue is scanned for all other requests for the same path and these messages are folded (that is their payload is populated from just completed listing) and routed back to sender without ever hitting the database. Ancillary changes include - instead of hardcoded time in the future when quota and FS stat scan start, use already available settings for durations between run. This is to avoid triggering these scans when PnfsManager is restarted often (when testing for instance). And a few "final" qualifiers added where suggested by IDE. Result: Lists of large directories no longer hog PnfsManage denying service to all other list calls. Additionally observed significnat reduction of CPU and IO load on chimera DB host. Patch has been running in production at Fermilab and has shown to solve the issue of listings timing out. patch: https://rb.dcache.org/r/13992/ Acked-by: Al, Paul, Tigran Target: master Request: 9.x Request: 8.x Require-book: no Require-notes: yes
- Loading branch information
1 parent
9680a85
commit d7653b9
Showing
2 changed files
with
112 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters