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

cvm: Correctly set the amount of DMA memory for NVME and MANA #387

Open
jaredwhitedev opened this issue Nov 22, 2024 · 3 comments
Open

cvm: Correctly set the amount of DMA memory for NVME and MANA #387

jaredwhitedev opened this issue Nov 22, 2024 · 3 comments

Comments

@jaredwhitedev
Copy link
Contributor

The code determining the amount of DMA memory for NVME on CVMs:

    // TODO: determine actual memory usage by NVME/MANA. hardcode as 10MB
    let device_dma = 10 * 1024 * 1024;

link
Is insufficient for local storage in our lab testing (TDX VM, 64 VPs, 4 CCs with 16 QPs each). While running storage workloads, we observe errors like the following:

[  198.545471] nvme_driver::driver: ERROR  failed to create io queue, falling back cpu=0x35 fallback_cpu=0x33 error=failed to create io queue pair 4: failed to allocate pages for queue requests: failed to allocate shared mem: unable to allocate shared pool size 128 with tag vfio dma

We also see fewer interrupts than we expect.

Increasing this value such that we no longer saw these errors led to significantly increased IOPS and reduced CPU usage.

@jaredwhitedev
Copy link
Contributor Author

Looks like the original code was committed by @mingweishih

@yupavlen-ms
Copy link

@chris-oo FYI

This value is only used to allocate shared pool, looks like this is what being used in their tests?

@chris-oo
Copy link
Member

the TODO here is to figure out how much we actually need per device, and reserve appropriately.

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

No branches or pull requests

3 participants