All of lore.kernel.org
 help / color / mirror / Atom feed
* [Virtio-fs] Large memory consumption by virtiofsd, suspecting fd's aren't being closed?
@ 2021-03-22  4:09 Eric Ernst
  2021-03-22 16:09 ` Miklos Szeredi
  0 siblings, 1 reply; 11+ messages in thread
From: Eric Ernst @ 2021-03-22  4:09 UTC (permalink / raw)
  To: virtio-fs

Hey ya’ll,

One challenge I’ve been looking at is how to setup an appropriate memory cgroup limit for workloads that are leveraging virtiofs (ie, running pods with Kata Containers). I noticed that memory usage of the daemon itself can grow considerably depending on the workload; though much more than I’d expect.

I’m running workload that simply runs a build on kernel sources with -j3. In doing this, the source of the linux kernel are shared via virtiofs (no DAX), so as the build goes on, there are a lot of files opened, closed, as well as created. The rss memory of virtiofsd grows into several hundreds of MBs.

When taking a look, I’m suspecting that virtiofsd is carrying out the opens, but never actually closing fds. In the guest, I’m seeing fd’s on the order of 10-40 for all the container processes as it runs, whereas I see the number of fds for virtiofsd continually increasing, reaching over 80,000 fds. I’m guessing this isn’t expected?

Can any ya’ll help shed some light, or where I can look?

Thanks,
Eric



^ permalink raw reply	[flat|nested] 11+ messages in thread
* [Virtio-fs] Large memory consumption by virtiofsd, suspecting fd's aren't being closed?
@ 2021-03-22  4:14 Eric Ernst
  2021-03-22 14:42 ` Vivek Goyal
  0 siblings, 1 reply; 11+ messages in thread
From: Eric Ernst @ 2021-03-22  4:14 UTC (permalink / raw)
  To: virtio-fs

[-- Attachment #1: Type: text/plain, Size: 1094 bytes --]

Hey ya’ll,

One challenge I’ve been looking at is how to setup an appropriate memory
cgroup limit for workloads that are leveraging virtiofs (ie, running pods
with Kata Containers that leverage virtiofs). I noticed that memory usage
of the daemon itself can grow considerably depending on the workload;
though much more than I’d expect.

I’m running workload that simply runs a build on kernel sources with -j3.
In doing this, the source of the linux kernel are shared via virtiofs (no
DAX), so as the build goes on, there are a lot of files opened, closed, as
well as created. The rss memory of virtiofsd grows into several hundreds of
MBs.

When taking a look, I’m suspecting that virtiofsd is carrying out the
opens, but never actually closing fds. In the guest, I’m seeing fd’s on the
order of 10-40 for all the container processes as it runs, whereas I see
the number of fds for virtiofsd continually increasing, reaching over
80,000 fds. I’m guessing this isn’t expected?

Can any ya’ll help shed some light, or where I can look?

Thanks,
Eric

[-- Attachment #2: Type: text/html, Size: 2080 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-03-23 15:31 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-22  4:09 [Virtio-fs] Large memory consumption by virtiofsd, suspecting fd's aren't being closed? Eric Ernst
2021-03-22 16:09 ` Miklos Szeredi
2021-03-22 16:47   ` Vivek Goyal
2021-03-22 19:15     ` Miklos Szeredi
2021-03-23 11:55     ` Sergio Lopez
2021-03-23 13:47       ` Vivek Goyal
2021-03-23 14:52         ` Eric Ernst
2021-03-23 15:19           ` Sergio Lopez
2021-03-23 15:31           ` Vivek Goyal
  -- strict thread matches above, loose matches on Subject: below --
2021-03-22  4:14 Eric Ernst
2021-03-22 14:42 ` Vivek Goyal

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.