Thank you for your reply.
According to what you said, I set open files to 1024 and solved the problem.
Thanks!
-------
Sorry for not mentioning the version information.
The version of libvirt is 4.5.0.
Regards,
John
Daniel P. Berrangé <berrange@xxxxxxxxxx> 于2019年11月4日周一 下午6:04写道:
On Mon, Nov 04, 2019 at 04:55:07PM +0800, John Y. wrote:
> 1. It takes minutes to start the virtual machine when I add "filterref" to
> libvirt.xml and run command "virsh start vm1".
> It also takes minutes to destroy the virtual machine.
You don't mention which version of libvirt you have...
My guess is that your docker container has set an enourmous ulimit
for max files. On a normal host it is 1024, but on docker I've seen
it default to 1 million.
This impacts libvirt when it spawns processes, which is common with
nwfilter in particular, because we must close all open file handles.
In v5.6.0 we added code to let libvirt use /proc/$PID/fd to close
file handles, which is massively faster when ulimits are high.
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
_______________________________________________ libvirt-users mailing list libvirt-users@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvirt-users