From 64420a7c7dd14eee1ff60b76b1a9e6fdbaa58a95 Mon Sep 17 00:00:00 2001 From: co Date: Sun, 30 Nov 2025 18:21:38 +0000 Subject: [PATCH 1/2] Improve logging and estimation in WarmCache process --- beacon-chain/db/filesystem/blob.go | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/beacon-chain/db/filesystem/blob.go b/beacon-chain/db/filesystem/blob.go index 2c227233c49c..00ffb3d660de 100644 --- a/beacon-chain/db/filesystem/blob.go +++ b/beacon-chain/db/filesystem/blob.go @@ -121,11 +121,18 @@ type BlobStorage struct { // will be populated at node startup, avoiding a costly cold prune (~4s in syscalls) during syncing. func (bs *BlobStorage) WarmCache() { start := time.Now() - if bs.layoutName == LayoutNameFlat { - log.Info("Blob filesystem cache warm-up started. This may take a few minutes") - } else { - log.Info("Blob filesystem cache warm-up started") + + dirs, err := listDir(bs.fs, ".") + if err != nil { + log.WithError(err).Warn("Failed to list blob storage directories") } + est := time.Duration(len(dirs)) * time.Millisecond + + log.WithFields(logrus.Fields{ + "layout": bs.layout.name(), + "dir_count": len(dirs), + "estimated": est.String(), + }).Info("Warming up blob filesystem cache") if err := warmCache(bs.layout, bs.cache); err != nil { log.WithError(err).Error("Error encountered while warming up blob filesystem cache") From 1f003178d62d7fca0f166c218a50c39d37fd0e76 Mon Sep 17 00:00:00 2001 From: co Date: Sun, 30 Nov 2025 18:33:34 +0000 Subject: [PATCH 2/2] create a changelog file with blob warmcache logging changes --- changelog/conj40_better-warmcache-logging.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 changelog/conj40_better-warmcache-logging.md diff --git a/changelog/conj40_better-warmcache-logging.md b/changelog/conj40_better-warmcache-logging.md new file mode 100644 index 000000000000..32a7fd93bfed --- /dev/null +++ b/changelog/conj40_better-warmcache-logging.md @@ -0,0 +1,3 @@ +### Changed + +- Improved logging in `WarmCache` to provide better insights during blob filesystem cache warm-up, including estimated time and directory count. \ No newline at end of file