I've got a Volume Using 727MB Inside the Container, but It's Reporting 4GB of Usage in the Dashboard.

2 months ago

In my container if I run a df -h, I get te following:

Filesystem                Size      Used Available Use% Mounted on
overlay                   1.9T      1.1T    799.4G  59% /
/dev/redacted            43.8G    727.2M     43.1G   2% /data

/dev/redacted is my mounted railway volume with my app data in it. The system only sows 727MB of used space, but for some reason the Railway dashboard is showing 4GB of usage.

I understand there being a certain percentage of overage from filesystem metadata, but the discrepancy here is more than 4x my actual file data.

I have 21523 files on the volume, calculated with find | wc -l.

Is anything wrong with this or does that seem normal?

Solved

2 Replies

sam-a
EMPLOYEE

2 months ago

Good question! The discrepancy is expected and comes from how volume storage is measured.

Your volume has daily backups enabled (with 6-day retention), so there are currently 6 ZFS snapshots. Railway's usage metric reflects the total ZFS dataset size, which includes:

1. Your actual file data (~727MB)

2. Space held by backup snapshots (blocks that have changed since each snapshot was taken)

3. Filesystem metadata/journal overhead

df -h inside the container only shows live filesystem usage, but the snapshots retain old versions of any blocks that were modified or deleted since they were created. With 6 daily snapshots and active writes, that snapshot overhead adds up to the ~3GB difference you're seeing.

This is normal behavior for volumes with backups enabled. If you'd like to reduce the reported usage, you could reduce the backup retention period, though the current setup is reasonable for data safety.

Let us know if you need more help.


Status changed to Awaiting User Response Railway 2 months ago


Status changed to Solved zicklag 2 months ago


sam-a

Good question! The discrepancy is expected and comes from how volume storage is measured. Your volume has daily backups enabled (with 6-day retention), so there are currently 6 ZFS snapshots. Railway's usage metric reflects the total ZFS dataset size, which includes: 1\. Your actual file data (\~727MB) 2\. Space held by backup snapshots (blocks that have changed since each snapshot was taken) 3\. Filesystem metadata/journal overhead `df -h` inside the container only shows live filesystem usage, but the snapshots retain old versions of any blocks that were modified or deleted since they were created. With 6 daily snapshots and active writes, that snapshot overhead adds up to the \~3GB difference you're seeing. This is normal behavior for volumes with backups enabled. If you'd like to reduce the reported usage, you could reduce the backup retention period, though the current setup is reasonable for data safety. Let us know if you need more help.

2 months ago

Ah, OK, that makes sense! I'm actually glad that the backup data is included in the usage, so I can keep tabs on it, I just couldn't tell that the backups were contributing to the reported volume size.

I thought it was strange that each of the backups also seemed to report the total size of the volume, instead of the incremental size of the backup itself.

It could be pretty handy probably to have one of those little hover circles or something like that somewhere around the volume size so that you can learn that it's indicating the total size including backups.

Thanks for clearing that up for me!


Status changed to Awaiting Railway Response Railway 2 months ago


Status changed to Solved jake 2 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...