Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion svc/pkg/cluster/util/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use types::rivet::backend::{self, pkg::*};
use uuid::Uuid;

pub mod test;
pub mod metrics;
pub mod test;

// Use the hash of the server install script in the image variant so that if the install scripts are updated
// we won't be using the old image anymore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,21 @@ pub async fn configure() -> GlobalResult<String> {
.map(|(k, v)| format!("cat << 'EOF' > /etc/trafficserver/{k}\n{v}\nEOF\n"))
.collect::<Vec<_>>();

// Update default storage config size to be entire filesystem size minus 4GB
// Update default storage config size to be entire filesystem size minus 4 GB
//
// journald = max 1 GB (see svc/pkg/cluster/worker/src/workers/server_install/install_scripts/files/sysctl.sh)
// misc logs = 300 MB
// /lib = 500 MB
// /usr = ~2 GB
// other misc = ~300 MB
// total = ~4.1 GB
//
// With significant padding, we'll allocate 8 GB for the system to make sure ATS doesn't run out of disk.
config_scripts.push(
indoc!(
r#"
df -h / |
awk 'NR==2 {gsub(/G/, "", $2); print $2 - 4 "G"}' |
awk 'NR==2 {gsub(/G/, "", $2); print $2 - 8 "G"}' |
xargs -I {} sed -i 's/64G/{}/' /etc/trafficserver/storage.config
"#
)
Expand Down