diff --git a/src/ray/common/file_system_monitor.cc b/src/ray/common/file_system_monitor.cc index 014596679327..4a5ee7fd413f 100644 --- a/src/ray/common/file_system_monitor.cc +++ b/src/ray/common/file_system_monitor.cc @@ -102,10 +102,15 @@ bool FileSystemMonitor::OverCapacityImpl( return false; } + // Convert bytes to GB + const double available_gb = + static_cast(space_info->available) / (1024 * 1024 * 1024); + double capacity_gb = static_cast(space_info->capacity) / (1024 * 1024 * 1024); + std::ostringstream ostr; ostr << path << " is over " << capacity_threshold_ * 100 - << "\% full, available space: " << space_info->available - << "; capacity: " << space_info->capacity + << "\% full, available space: " << available_gb << " GB" + << "; capacity: " << capacity_gb << " GB" << ". Object creation will fail if spilling is required."; RAY_EVENT_EVERY_MS(ERROR, "Out of Disk", 10 * 1000) << ostr.str(); RAY_LOG_EVERY_MS(ERROR, 10 * 1000) << ostr.str();