-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pool: Fix contention in MetaDataCache
Quite some time ago I changed the pool to use several threads for message processing. The point was in particular that we could benefit from added concurrency in meta data operations. Since meta data operations tend to become a bottleneck if the pool is under high load (in particular if the meta data is stored on the same disks as the data itself), this parallelization seemed like a good idea. Transfers of course already run in different threads and any meta data update issued as part of a transfer will also be done in parallel. Unfortunately, the MetaDataCache class destroys all this nice concurrency. The class was designed to achieve concurrency in the read operation to allow files to be read even while the pool was still starting. The create and remove methods on the other hand are synchronized, and thus at most one thread will ever be able to create or remove entries. I recently observed this to be a major contention point on one of our ALICE tape pools. This patch pretty much rewrites MetaDataCache. It introduces a monitor (in the ADA sense of the word) for each entry, thus simplifying synchronization significantly. This also made it very easy to allow create and remove operations to be performed concurrently. Given the severity of the contention, I kindly ask for a thorough review followed by merge to recent stable branches. I would skip 1.9.12 due to its age. Target: trunk Require-notes: yes Require-book: no Request: 2.3 Request: 2.2 Acked-by: Paul Millar <paul.millar@desy.de> Patch: http://rb.dcache.org/r/4750/
- Loading branch information
Gerd Behrmann
committed
Sep 5, 2012
1 parent
5a5642b
commit 84fb7b0
Showing
1 changed file
with
133 additions
and
95 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