Skip to content

Commit

Permalink
cfgen: overrid config for tw hosts
Browse files Browse the repository at this point in the history
Summary: title says it

Differential Revision: D58302088

fbshipit-source-id: 71a1e94335004fae24381598c7c378b83884c141
  • Loading branch information
Chengxiong Ruan authored and facebook-github-bot committed Jun 7, 2024
1 parent 8b50ed0 commit 57b302d
Show file tree
Hide file tree
Showing 9 changed files with 572 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/oomd/cfgen/src/cfgen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -866,7 +866,7 @@ fn should_setup_iocost(node: &Node) -> bool {
}

fn fbtax2_blacklisted_jobs(node: &Node) -> Vec<&'static str> {
if get_host_type(node) == HostType::TwShared {
if [HostType::TwShared, HostType::Tw].contains(&get_host_type(node)) {
return vec![
// This ML model has extremely high memory usage, they need to fix
// their stuff at some point.
Expand Down Expand Up @@ -897,7 +897,7 @@ fn senpai_targets(node: &Node) -> Option<String> {
}

match get_host_type(node) {
HostType::TwShared => Some(String::from(
HostType::TwShared | HostType::Tw => Some(String::from(
"system.slice,workload.slice/workload-wdb.slice,hostcritical.slice,workload.slice/workload-wdb.slice/*,hostcritical.slice/*",
)),
HostType::Synmon => Some(String::from("system.slice")),
Expand All @@ -906,7 +906,7 @@ fn senpai_targets(node: &Node) -> Option<String> {
}

fn senpai_limit_min_bytes(node: &Node) -> Option<String> {
if [HostType::TwShared, HostType::Synmon].contains(&get_host_type(node)) {
if [HostType::TwShared, HostType::Tw, HostType::Synmon].contains(&get_host_type(node)) {
let min_bytes = 100 * 1024 * 1024;
return Some(min_bytes.to_string());
}
Expand Down Expand Up @@ -935,6 +935,10 @@ fn get_host_type(node: &Node) -> HostType {
return HostType::TwShared;
}

if node.hostname_prefix() == TW {
return HostType::Tw;
}

if node.hostname_prefix() == OD {
return HostType::OnDemand;
}
Expand Down
1 change: 1 addition & 0 deletions src/oomd/cfgen/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ pub enum HostType {
DevServer,
OnDemand,
TwShared,
Tw,
Synmon,
Dns,
}
Expand Down
84 changes: 84 additions & 0 deletions src/oomd/cfgen/test/cfgen_test_inputs/twpool.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
@generated SignedSource<<f1ded817beb0796e1f26f7e8cf3b2712>>
@codegen-command arc cfgen update-inputs fb-oomd
{
"fqdn": "tw066.02.cln2.facebook.com",
"region": "ireland",
"clusterType": "SERVICE_GENERIC_NON_MEMCACHE",
"modelId": 333376,
"kernelRelease": "5.19.0-0_fbk12_11583_g0bef9520ca2b",
"serverType": "TYPE_I_WEB",
"experiments": [],
"cpuArchitecture": "skylakede",
"metalosRootfs": false,
"provisioningConfig": {
"ethtoolByInterface": {
"eth0": {
"maxChannelsCombined": 36
}
},
"cpuCoreCount": 18,
"parentModelId": 334303,
"recoveryEnvironment": false,
"deviceType": "SERVER",
"datacenter": "cln2",
"cluster": "02",
"memTotal": 66999275520,
"osVersion": {
"distribution_name": "CentOS Stream release",
"version": 9,
"is_in_ramdisk": false,
"is_metalos": false
},
"pciByAddress": {
"0000:02:00.0": {
"vendor_id": 5555,
"device_id": 4117,
"class_code": 131072,
"board_part_number": "MCX4431N-GCAN_FB"
}
},
"static_smc_tiers": [],
"machine": "x86_64"
},
"bootConfig": {
"ethtoolByInterface": {
"eth0": {
"driver": "mlx5_core",
"driver_version": "5.19.0-0_fbk12_11583_g0bef9520c",
"firmware_version": "14.32.1206 (FB_0000000006)",
"bus_info": "0000:02:00.0"
}
}
},
"runtimeConfig": {
"hasHighPrivCert": true,
"regionRoutableCluster": "cln1.02",
"block_devices": {
"block_devices": {
"nvme0n1": {
"size_bytes": 256060514304,
"is_rotational": false,
"model": "HFS256GD9TNG-62A0A",
"serial": "MJ91N499211501J6C",
"physical_block_size": 512,
"logical_block_size": 512,
"is_root": true
}
}
},
"dynamic_smc_tiers": [],
"cluster_state": "CLUSTER_IN_USE",
"installed_platforms": [
"platform010",
"platform010-compat"
],
"device_nics_enum": [
"ETH0",
"SVC0"
]
},
"reservationConfig": {
"active_machine_materialization_id": "",
"current_reservation_host_profile_id": "NEWLY_PROVISIONED_PROFILE"
}
}
84 changes: 84 additions & 0 deletions src/oomd/cfgen/test/cfgen_test_inputs/twpool_no_senpai.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
@generated SignedSource<<385d00650b8b80058480fedbea087963>>
@codegen-command arc cfgen update-inputs fb-oomd
{
"fqdn": "tw023.04.vll2.facebook.com",
"region": "newmexico",
"clusterType": "HADOOP",
"modelId": 331202,
"kernelRelease": "5.19.0-0_fbk12_11583_g0bef9520ca2b",
"serverType": "TYPE_VI_FEED",
"experiments": [],
"cpuArchitecture": "skylake",
"metalosRootfs": false,
"provisioningConfig": {
"ethtoolByInterface": {
"eth0": {
"maxChannelsCombined": 63
}
},
"cpuCoreCount": 40,
"parentModelId": 333803,
"recoveryEnvironment": false,
"deviceType": "SERVER",
"datacenter": "vll2",
"cluster": "04",
"memTotal": 270019551232,
"osVersion": {
"distribution_name": "CentOS Stream release",
"version": 9,
"is_in_ramdisk": false,
"is_metalos": false
},
"pciByAddress": {
"0000:5e:00.0": {
"vendor_id": 5555,
"device_id": 4117,
"class_code": 131072,
"board_part_number": "MCX4411D-ACAN_FB"
}
},
"static_smc_tiers": [],
"machine": "x86_64"
},
"bootConfig": {
"ethtoolByInterface": {
"eth0": {
"driver": "mlx5_core",
"driver_version": "5.19.0-0_fbk12_11583_g0bef9520c",
"firmware_version": "14.27.2606 (FB_0000000005)",
"bus_info": "0000:5e:00.0"
}
}
},
"runtimeConfig": {
"hasHighPrivCert": true,
"regionRoutableCluster": "vll1.02",
"block_devices": {
"block_devices": {
"sda": {
"size_bytes": 2000398934016,
"is_rotational": true,
"model": "HGST HUS722T2TALA604",
"serial": "WMC6N0P94N1J",
"physical_block_size": 512,
"logical_block_size": 512,
"is_root": true
}
}
},
"dynamic_smc_tiers": [],
"cluster_state": "CLUSTER_IN_USE",
"installed_platforms": [
"platform010",
"platform010-compat"
],
"device_nics_enum": [
"ETH0",
"SVC0"
]
},
"reservationConfig": {
"active_machine_materialization_id": "",
"current_reservation_host_profile_id": "NEWLY_PROVISIONED_PROFILE"
}
}
5 changes: 5 additions & 0 deletions src/oomd/cfgen/test/cfgen_test_manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,8 @@ samples:
devbig:
# this host is a sample from the "wdb config monitor" scuba table
production_host: devbig284.ash8.facebook.com
twpool:
# this host is a sample from the "wdb config monitor" scuba table
production_host: tw066.02.cln2.facebook.com
twpool_no_senpai:
production_host: tw023.04.vll2.facebook.com
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@generated SignedSource<<3dd8c7637bb7afa680fc168e9c49060d>>
@codegen-command arc cfgen update-outputs fb-oomd
[Service]
Environment=OOMD_ARGS='--interval 1 --config /etc/oomd2.json --drop-in-dir /run/oomd/dropin'

[Unit]
Loading

0 comments on commit 57b302d

Please sign in to comment.