Page MenuHomeFreeBSD

Add a tunable to set the pgcache zone's maxcache
ClosedPublic

Authored by gallatin on Oct 22 2019, 3:38 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 19 2024, 10:35 PM
Unknown Object (File)
Mar 19 2024, 10:33 PM
Unknown Object (File)
Mar 19 2024, 7:54 PM
Unknown Object (File)
Mar 19 2024, 7:54 PM
Unknown Object (File)
Dec 22 2023, 2:12 AM
Unknown Object (File)
Dec 20 2023, 1:11 AM
Unknown Object (File)
Aug 23 2023, 3:48 PM
Unknown Object (File)
Jun 3 2023, 8:05 AM
Subscribers

Details

Summary

We currently set the maxcache to 0 on the pgcache uma zone. Under a heavy Netflix ktls encrypted web workload, this leads to lock contention on the vm page free queue from vm_page_zone_import / vm_page_zone_release as the buckets are frequently drained. This change adds a tunable to allow the administrator to specify the maxache.

On a Netflix 100G cache (16 core / 32t Xeon E5-v4 2697A), we get to about 80Gb/s with CPU maxed contending for the vm page free lock when maxcache is 0. When it is set to 0x60000 we reach 95Gb/s with idle CPU.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

We have run into issues with the auto-tuning here. It all needs to do better. We should be able to set max cache based on total memory. I'm not opposed to this patch as an intermediate step though.

In D22112#483262, @jeff wrote:

We have run into issues with the auto-tuning here. It all needs to do better. We should be able to set max cache based on total memory. I'm not opposed to this patch as an intermediate step though.

Indeed, I noted this when we discussed it on slack. As a start, uma_reclaim() needs to start reclaiming from cache zones in at least this case. (It probably doesn't make much sense to reclaim cached bufs, for instance.)

This revision is now accepted and ready to land.Oct 22 2019, 11:04 PM
This revision was automatically updated to reflect the committed changes.