Skip to content

Memory (FreeBSD): fixing disk cache fetching#2418

Closed
crocidb wants to merge 1 commit into
fastfetch-cli:devfrom
crocidb:dev
Closed

Memory (FreeBSD): fixing disk cache fetching#2418
crocidb wants to merge 1 commit into
fastfetch-cli:devfrom
crocidb:dev

Conversation

@crocidb

@crocidb crocidb commented Jun 25, 2026

Copy link
Copy Markdown

Summary

Memory fetching for FreeBSD was using vm.stats.vm.v_cache_count as cache, but FreeBSD's kernel doesn't have cache pages since version 12. The value is still there for compatibility, but it returns always 0.

Changes

  • using filesystem buffer cache and ARC cache: vfs.bufspace tracks the bytes used to buffer the filesystem addressing for other filesystems than ZFS, and ARC tracks buffers AND cache for ZFS, which bypasses bufspace entirely. I also decrease the minimum ARC cache, since that's arguably non retrievable memory. The results now are more aligned with how other monitoring tools track memory. In fact, I submitted PRs for btop and htop to fix similar issues.

Checklist

  • I have tested my changes locally

@codacy-production

Copy link
Copy Markdown
Contributor

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@CarterLi CarterLi closed this in 0a28f1d Jun 27, 2026
CarterLi added a commit that referenced this pull request Jun 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant