Replies: 1 comment 2 replies
-
If you do a lot of calls then you really should be calling into the REST API directly and not shell out for every single command.
I like to avoid this unless absolutely necessary, making it configurable will make supporting it much harder as we now need to consider which sqlite options were used.
I don't know how much this would benifit podman, we still have a lot of writers.
How would this help when the underlying storage is still slow? If it doesn't fsync in this case then it is much more likely to corrupt the database so I don't see how this helps. Although I don't really know much about sqlite options so maybe I am missing something? |
Beta Was this translation helpful? Give feedback.
-
We use podman as one of our options for CI worker container orchestration.
It works very well.
However, we have received reports from users who run our CI worker on some AWS configurations that "Database is locked" error often happens.
We have checked and the Podman version was v4.9.2 and does include this fix #20850
After digging deeper, I think the situation is as follows:
podman
executable to create/exec/remove containerssqlite3
connection pool, with transaction exclusive lock and forcefsync()
pragma.fsync
, leading to eachpodman
process waiting for the lock for longer.If my observation above is accurate, I think the steps to fix this are as follows:
Make use of "podman system service" and
podman remote
to funnel all requests to a single podman daemon with a single connection pool.Update libpod/sqlite_state.go so that the pragma is configurable. (Optional)
Create 2 separate Read-Only and Read-Write connection pools. [Advice Needed] What is a proper way to query concurrently? mattn/go-sqlite3#1022 (comment). This effectively uses a daemon-side lock, allows us to switch transaction lock to
immediate
and thus, improves concurrency of read-only workload.Expose configuration to enable mmap pragma to help speed up the database transaction.
Beta Was this translation helpful? Give feedback.
All reactions