Skip to content
Open
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
15 changes: 11 additions & 4 deletions beacon-chain/db/filesystem/blob.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
3 changes: 3 additions & 0 deletions changelog/conj40_better-warmcache-logging.md
Original file line number Diff line number Diff line change
@@ -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.