File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,28 @@ be coming from the fact that the custom logic is implemented in the same process
7474that handles Virtio queues, which reduces the number of required context
7575switches.
7676
77+ ## Disadvantages
78+
79+ In order for the backend to be able to process virtio requests, guest memory
80+ needs to be shared by the frontend to the backend. This means, a shared memory
81+ mapping is required to back guest memory. When a vhost-user device is
82+ configured, Firecracker uses ` memfd_create ` instead of creating an anonymous
83+ private mapping to achieve that. It was observed that page faults to a shared
84+ memory mapping take significantly longer (up to 24% in our testing), because
85+ Linux memory subsystem has to use atomic memory operations to update page
86+ status, which is an expensive operation under specific conditions. We advise
87+ users to profile performance on their workloads when considering to use
88+ vhost-user devices.
89+
90+ ## Other considerations
91+
92+ Compared to virtio block device where Firecracker interacts with a drive file on
93+ the host, vhost-user block device is handled by the backend directly. Some
94+ workloads may benefit from caching and readahead that the host pagecache offers
95+ for the backing file. This benefit is not available in vhost-user block case.
96+ Users may need to implement internal caching within the backend if they find it
97+ appropriate.
98+
7799## Backends
78100
79101There are a number of open source implementations of a vhost-user backend
You can’t perform that action at this time.
0 commit comments