mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #874] A lot of disk write when vision is on. #382
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#382
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @HouZoengLo on GitHub (Oct 5, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/874
During a single agent task there is a lot of disk write of the python process with "--vision yes". When I turn off vision there is no disk write any more.
@talisp commented on GitHub (Oct 5, 2026):
This matches the code. With vision on, every request that contains images writes a combined embeddings file for all the images in the prompt:
serve/server.py,combined = self.vision.dir / f"req-{uuid…}.sve", the bytes of each image's cached.sveconcatenated, deleted after the request.Each image's embeddings are ~9–10 MB here (1024 image tokens). An agent that keeps its screenshots in the conversation re-sends them every turn, so with N images in the history every turn writes ~N × 9–10 MB, even though each image is encoded only once. The per-image cache (
<hash>.sve, at most 64, the oldest are deleted) is written once per new image.Workarounds (opinion):
TMPDIR=/dev/shmfor the server process. Then those writes never hit the disk. The cost is RAM: up to ~64 × 10 MB per server run, plus one combined file at a time. Note #914: oldstrata-vision-*dirs are not removed between runs.A real fix would be to pass the per-image files to the engine instead of concatenating them per request.
@Niko1221 commented on GitHub (Oct 6, 2026):
Fixed in 0.1.40: the per-request combined embeddings file goes to /dev/shm on Linux when it has room and is a short-lived temporary file on Windows, so images no longer cause heavy steady disk writes. Reading the cached per-image files directly is a later step.