Skip to content

inexplicable difference between fileSystemSize and fileSystemMaxSpace #8140

Description

@calestyo

Hey.

I was trying to understand the meaning of the various pool spaces in the REST output (for adding them to my Prometheus exporter).
E.g. there's:

        "space": {
          "total": 17583515092665,
          "free": 13804589006848,
          "precious": 0,
          "removable": 0,
          "lru": 1783180729,
          "gap": 53687091200,
          "breakEven": 0.7

whose values seem to be always(?) the same than those:

    "repositoryData": {
      "label": "Repository",
      "state": "OPEN",
      "files": 13544,
      "totalDiskSpace": "17583515092665",
      "freeDiskSpace": 13804589006848,
      "usedDiskSpace": 3778926085817,
      "preciousDiskSpace": 0,
      "removableDiskSpace": 0,
      "usedDiskSpaceRatio": 0.21491300606858676,
      "preciousDiskSpaceRatio": 0.0,
      "removableDiskSpaceRatio": 0.0,
      "fileSystemSize": 17592186044416,
      "fileSystemFree": 13804589006848,
      "fileSystemRatioFreeToTotal": 0.7847000351175666,
      "fileSystemMaxSpace": 17583515092665,
      "gap": 53687091200
    },

Now my understanding would be as follows:

  • totalDiskSpace is always whatever fileSystemMaxSpace is

  • usedDiskSpace is the sum of all data files on the pool, taking the apparent size not the used space

  • freeDiskSpace is simply the former - the later (or can it be anything else?)

  • fileSystemSize and fileSystemFree is whatever the filesystem reports
    Do you by chance know what exactly that is? I mean df would use statfs(2) or fstatfs(2)… I tried to quickly skim through dCache's code and I guess it uses Java FileStore’s getTotalSpace and getUsableSpace? And what these use probably depend on the platform?

  • fileSystemMaxSpace my undrestanding is that this is always <= fileSystemSize and the value/percentage set by the set max diskspace command?

Right so far?

But here the issue:
I have e.g.

> info
…
--- rep (Repository manager) ---
State : OPEN
Files : 13544
Disk space
    Total    : 17583515092665
    Used     : 3778926085817    [0.21491300606858676]
    Free     : 13804589006848    Gap : 53687091200
    Precious : 0    [0.0]
    Removable: 0    [0.0]
File system
    Size : 17592186044416
    Free : 13804589006848    [0.7847000351175666]
Limits for maximum disk space
    File system (limit)  : 17583515092665 (100%)
    Statically configured: -
    Runtime configured   : -
Sweeper Policy
    lru   : 0
    margin: 0.0

The pool in question has no set max diskspace , and indeed it shows 100%, yet: 17592186044416-17583515092665 = 8670951751

Where does that discrepancy come from? It's not the gap.

Does it have to do with @kofemann’s commit 208bfbe? And if not... is that (even further?) reduction somewhere exported?

Thanks,
Chris.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions