Until osbuild-14, the images were unconditionally kept in the cache, meaning the cache could grow very large. Now only the downloaded RPMs are saved, which greatly limits how big it can grow. Having the RPMs cached should speed up all but the first image build a lot, so we should take advantage of that by not flushing the cache between each build. The cache is still flushed when the worker is stopped / restarted. This moves the cache from /var/tmp/osbulid-worker* to /var/cache/osbulid-worker/osbulid-worker-*. This means that each worker gets a dedicated cache, in case there are several on one machine. In the future we may want to combine them and only ever have one cache, but for that we need improvements in parallel access and cache-cleanup. Signed-off-by: Tom Gundersen <teg@jklm.no>
19 lines
548 B
Desktop File
19 lines
548 B
Desktop File
[Unit]
|
|
Description=OSBuild Composer Worker (%i)
|
|
Requires=osbuild-composer.socket
|
|
After=multi-user.target osbuild-composer.socket
|
|
|
|
[Service]
|
|
Type=simple
|
|
PrivateTmp=true
|
|
ExecStart=/usr/libexec/osbuild-composer/osbuild-worker -unix /run/osbuild-composer/job.socket
|
|
Restart=on-failure
|
|
RestartSec=10s
|
|
CPUSchedulingPolicy=batch
|
|
IOSchedulingClass=idle
|
|
CacheDirectory=osbuild-worker
|
|
# systemd >= 240 sets this, but osbuild-worker runs on earlier versions
|
|
Environment="CACHE_DIRECTORY=/var/cache/osbuild-worker"
|
|
|
|
[Install]
|
|
WantedBy=osbuild-composer.service
|