Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Adjust proguard caching #1492

Merged
merged 2 commits into from
Jul 4, 2024
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 crates/symbolicator-proguard/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,6 @@ impl CacheItemRequest for FetchProguard {
}

fn use_shared_cache(&self) -> bool {
false
true
}
}
2 changes: 1 addition & 1 deletion crates/symbolicator-service/src/caching/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ impl Caches {
config,
config.caches.downloaded.into(),
max_lazy_redownloads,
in_memory.proguard_capacity,
default_cap,
)?,
})
}
Expand Down
12 changes: 0 additions & 12 deletions crates/symbolicator-service/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -314,19 +314,11 @@ pub struct InMemoryCacheConfig {
///
/// Defaults to `3 GiB (= 3_221_225_472)`
pub fileinbundle_capacity: u64,

/// Capacity (in bytes) for the in-memory proguard mapper cache.
///
/// The in-memory size limit is a best-effort approximation, and not an exact limit.
///
/// Defaults to `5 GiB`.
pub proguard_capacity: u64,
}

impl Default for InMemoryCacheConfig {
fn default() -> Self {
let meg = 1024 * 1024;
let gig = 1024 * 1024 * 1024;
Self {
sentry_index_capacity: 100_000.try_into().unwrap(),
sentry_index_ttl: Duration::from_secs(3600),
Expand All @@ -338,10 +330,6 @@ impl Default for InMemoryCacheConfig {
// We noticed a significant reduction in CPU usage with a cache size of ~2G, which
// resulted in a hit ratio of ~60-65%. Lets give it a bit more then and see what happens.
fileinbundle_capacity: 3 * 1024 * meg,
// We use 5GiB as the in-memory cache size for Proguard files.
// Note that a Proguard mapper can take up hundreds of MB
// in memory.
proguard_capacity: 5 * gig,
}
}
}
Expand Down
Loading