-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Motivation: On startup NFS door executes a heavy query that calculates total number of files and total space used. On large installations, such as Fermilab dCache, that query takes 10-20 minutes (depending on hardware). NFS mounts hang for as much trying to mount the file system. A df command would hang as well. If NFS server is restarted (which is sometimes admin's reaction to hanging mounts) another query will start running. And so on Modification: Add a table t_fstat that captures usedFiles and usedSpace to be queried by NFS door. Insert default starting values (1M) for both. Add a function updateFsStat that runs at configurable intervals to update usedFiles and usedSpace by running aggregare select on t_inodes table effectively caching the result. Result: Mount (and df) command works without hangs. On upgrade the initial value of used space shown is 1M that gets updated after one hour based on default. Defaults can be tweaked in dcache.conf or layout files. Release Notes: Added functionality to cache total files and total space used on DB backend. Added two properties that control the behavior how often heavy query is run: pnfsmanager.fs-stat-cache.time = 3600 pnfsmanager.fs-stat-cache.time.unit = SECONDS Target: trunk Require-notes: yes Require-book: yes Patch: https://rb.dcache.org/r/13030/ Acked-by: tigran.mkrtchyan@desy.de, arossi@fnal.gov
- Loading branch information
1 parent
2133f6e
commit a63e603
Showing
14 changed files
with
197 additions
and
14 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
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
23 changes: 23 additions & 0 deletions
23
modules/chimera/src/main/resources/org/dcache/chimera/changelog/changeset-7.2.xml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<databaseChangeLog | ||
xmlns="http://www.liquibase.org/xml/ns/dbchangelog" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog | ||
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd"> | ||
|
||
<changeSet id="32" author="litvinse"> | ||
<comment>add FS statiscs table</comment> | ||
|
||
<createTable tableName="t_fstat"> | ||
<column name="iusedfiles" type="bigint"/> | ||
<column name="iusedspace" type="bigint"/> | ||
</createTable> | ||
|
||
<insert tableName="t_fstat"> | ||
<column name="iusedfiles" value="1048576"/> | ||
<column name="iusedspace" value="1048576"/> | ||
</insert> | ||
|
||
</changeSet> | ||
|
||
</databaseChangeLog> |
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
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
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
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
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