mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-29 19:10:38 +00:00
set thp:never during build
This commit is contained in:
@@ -297,7 +297,7 @@ async fn main() -> anyhow::Result<()> {
|
||||
build_tag: BUILD_TAG,
|
||||
});
|
||||
|
||||
proxy::jemalloc::disable_thp()?;
|
||||
proxy::jemalloc::inspect_thp()?;
|
||||
let jemalloc = match proxy::jemalloc::MetricRecorder::new() {
|
||||
Ok(t) => Some(t),
|
||||
Err(e) => {
|
||||
|
||||
@@ -10,6 +10,7 @@ use measured::{
|
||||
LabelGroup, MetricGroup,
|
||||
};
|
||||
use tikv_jemalloc_ctl::{config, epoch, epoch_mib, stats, version, Access, AsName, Name};
|
||||
use tracing::info;
|
||||
|
||||
pub struct MetricRecorder {
|
||||
epoch: epoch_mib,
|
||||
@@ -115,7 +116,9 @@ jemalloc_gauge!(metadata, metadata_mib);
|
||||
jemalloc_gauge!(resident, resident_mib);
|
||||
jemalloc_gauge!(retained, retained_mib);
|
||||
|
||||
pub fn disable_thp() -> Result<(), tikv_jemalloc_ctl::Error> {
|
||||
let opt_thp: &Name = "opt.thp".name();
|
||||
opt_thp.write("never")
|
||||
pub fn inspect_thp() -> Result<(), tikv_jemalloc_ctl::Error> {
|
||||
let opt_thp: &Name = c"opt.thp".to_bytes_with_nul().name();
|
||||
let s: &str = opt_thp.read()?;
|
||||
info!("jemalloc opt.thp {s}");
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user