Skip to content

Commit

Permalink
Tidy up the prefetcher logging (awslabs#1048)
Browse files Browse the repository at this point in the history
We have changed some log level in awslabs#1013. We probably want to push some
of them down to trace instead of debug.

Signed-off-by: Monthon Klongklaew <[email protected]>
  • Loading branch information
monthonk authored and rajdchak committed Oct 4, 2024
1 parent e4a831b commit 27600a9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions mountpoint-s3/src/mem_limiter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::{sync::atomic::Ordering, time::Instant};
use humansize::make_format;
use metrics::atomics::AtomicU64;
use mountpoint_s3_client::ObjectClient;
use tracing::debug;
use tracing::{debug, trace};

pub const MINIMUM_MEM_LIMIT: u64 = 512 * 1024 * 1024;

Expand Down Expand Up @@ -86,7 +86,7 @@ impl<Client: ObjectClient> MemoryLimiter<Client> {
.saturating_add(client_mem_allocated)
.saturating_add(self.additional_mem_reserved);
if new_total_mem_usage > self.mem_limit {
debug!(new_total_mem_usage, "not enough memory to reserve");
trace!(new_total_mem_usage, "not enough memory to reserve");
metrics::histogram!("prefetch.mem_reserve_latency_us").record(start.elapsed().as_micros() as f64);
return false;
}
Expand Down
4 changes: 2 additions & 2 deletions mountpoint-s3/src/prefetch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ use mountpoint_s3_client::ObjectClient;
use part::PartOperationError;
use part_stream::RequestTaskConfig;
use thiserror::Error;
use tracing::{debug, trace};
use tracing::trace;

use crate::checksums::{ChecksummedBytes, IntegrityError};
use crate::data_cache::DataCache;
Expand Down Expand Up @@ -369,7 +369,7 @@ where
if self.try_seek(offset).await? {
trace!("seek succeeded");
} else {
debug!(
trace!(
expected = self.next_sequential_read_offset,
actual = offset,
"out-of-order read, resetting prefetch"
Expand Down
8 changes: 4 additions & 4 deletions mountpoint-s3/src/prefetch/backpressure_controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::sync::Arc;
use async_channel::{unbounded, Receiver, Sender};
use humansize::make_format;
use mountpoint_s3_client::ObjectClient;
use tracing::{debug, trace};
use tracing::trace;

use crate::mem_limiter::MemoryLimiter;

Expand Down Expand Up @@ -189,7 +189,7 @@ impl<Client: ObjectClient> BackpressureController<Client> {
let available_mem = self.mem_limiter.available_mem();
if available_mem >= to_increase {
let formatter = make_format(humansize::BINARY);
debug!(
trace!(
current_size = formatter(self.preferred_read_window_size),
new_size = formatter(new_read_window_size),
"scaled up preferred read window"
Expand All @@ -209,10 +209,10 @@ impl<Client: ObjectClient> BackpressureController<Client> {
.max(self.min_read_window_size)
.min(self.max_read_window_size);
let formatter = make_format(humansize::BINARY);
debug!(
trace!(
current_size = formatter(self.preferred_read_window_size),
new_size = formatter(new_read_window_size),
"scaling down read window"
"scaled down read window"
);
self.preferred_read_window_size = new_read_window_size;
metrics::histogram!("prefetch.window_after_decrease_mib")
Expand Down

0 comments on commit 27600a9

Please sign in to comment.