RunRoot /var/run/containers/storage 存储容器pidfile、hostname之类的数据
GraphRoot /var/lib/containers/storage 存储容器的镜像layer和容器 rw-layer
graphLock /var/lib/containers/storage/storage.lock
�usernsLock /var/lib/containers/storage/userns.lock
�imageStore lock /var/lib/containers/storage/overlay-image/images.lock
containerStore lock /var/lib/containers/storage/overlay-image/containers.lock

�每个GraphDriver都对应一个store(我们这里成为graphStore)
每个graphStore都包含一个containeStore(rcs),有一个imageStore(gipath),还包含一个layerStore

containerStore/imageStore/layerStore都有一个全局锁
image.png

容器锁

每个容器都有一个锁,默认是用共享内存实现的一个Semaphore

image.png

Boltdb锁优化?

配置优化

/usr/share/containers/containers.conf events_logger 配置为none