Re: Runner's /varz endpoint - how "available_disk_ratio" is computed?

CF Runtime

Hi Rafal

Available disk ratio is computed by the formula 1 - (reserved_disk /

disk_capacity is indeed calculated from the disk_mb and multiplied by the

If you set your disk_mb value to be exactly the size of the disk on the
runner vm you are using with an overcommit factor of 1 the /varz reported
available_disk_ration should exactly track how much available disk you have
on each runner. This is not recommended, however, as you may want to
increase your overcommit factor in order to most efficiently use the disk
space on your runner VMs.

Instead, you can use `bosh vms --vitals` to get system level information
about disk usage of each available VM.

Zak Auerbach
CF Release Integration

On Thu, Oct 8, 2015 at 2:45 AM, Rafal Radecki <radecki.rafal(a)>

Hi :)

I tried to find in the source code on one of my runners how
available_disk_ratio is computed. Initially I thought that it will show how
much space there is available on my runner, for example:

df -h /var/vcap/data/
Filesystem Size Used Avail Use% Mounted on
/dev/xvdb2 820G 12G 767G 2% /var/vcap/data

So on my runner I see that 98% of space is free but in /varz I see that

available_disk_ratio -> 0.97152

From cf documentation (
"available_disk_ratio Percentage of disk available for allocation by
future applications/staging requests"
I tried to check this in source code ->


but I got to the point of
module Dea
class ResourceManager
"memory_mb" => 8 * 1024,
"memory_overcommit_factor" => 1,
"disk_mb" => 16 * 1024 * 1024,
"disk_overcommit_factor" => 1,
in resource_manager.rb.
Can anyone tell me how available_disk_ratio is exactly computed? I am not
sure but base on the lines for DEFAULT_CONFIG I think that it may be
computed based on statically set "disk_mb" value ;)
Overall I need this to my monitoring. Are there maybe other ways to tell
how many disc space is available on a given runner?


Join to automatically receive all group messages.