Skip to contentSkip to conversation

Overlayfs performance issue

DISCUSSION Miklos Szeredi 1 participant 1 message Jan 21, 2021 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 10 lines · garyhuang

Hi Miklos,

Have you ever come into this?

1. dockerd with overlay2
a. Running nginx in container mounting the host directory which contains the file to be accessed (docker -v xxx:xxx) b. Running nginx in container mounting the host file directly
The RPS varies too much (RPS(a) < RPS(b)), the more the workers are, the bigger the discount is

Quoted 6 lines

2. dockerd with devicemapper
Running nginx in container with both the same mounting scenarios, the RPS is not discounted

3. nginx on host, no performance discounted too. The RPS equals to container with devicemapper.

It is kernel related with big extra spinlock consumption observed by perf when running dockerd with overlayfs even the file is mounted from outside host path.

It's not clear where the contention is coming from. Can you get some detail from the perf trace where we can see which overlayfs functions are involved?

Thanks,
Miklos