[GH-ISSUE #2448] [Feature]: ~10x less SSD writing when switching long conversations — a small addition to #1480 #994

Closed
opened 2026-11-04 01:47:35 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @fqqdc on GitHub (Oct 14, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/2448

How it was made. I built it together with an AI coding assistant — it wrote the code, I set the goal and tested it on my PC. The code is here if you're curious: https://github.com/fqqdc/Strata-conversation-cache-delta/tree/conversation-cache-delta (it's #1480 plus my changes). I'm not planning to open a PR — I don't have any experience with that side of things — I just wanted to share it and hear what others think.

Hello! I work as a programmer, but this kind of low-level software really isn't my area — I don't write C/C++ and I know nothing about CUDA.

My situation. One Windows PC (64 GB RAM, RTX 5070 Ti 16 GB). My conversations get very long (up to ~256K), and switching back to one used to re-read the whole conversation every time — 40 to 85 seconds. PR #1480 (--conversation-cache-disk-only) fixed that for me: switching back now takes a couple of seconds. Thank you for it.

The catch. Every time you switch away, it saves the whole conversation to disk — over 2 GB for my 245K conversations. With daily use that adds up to tens of terabytes of writes a year, and I'd rather not wear out my SSD.

What I did. On top of #1480, I made it save only the part that actually changed. Two small housekeeping things came along: after a restart the cache folder cleans up its own leftovers, and when the folder is full it deletes the conversation you haven't used for the longest time (before, it deleted whichever file happened to sort first — sometimes one you'd just used).

Numbers from my own machine:

  • switching away from a 245K conversation: over 2 GB → about 227 MB (roughly 10x less)
  • switching away from a 121K conversation: about 1.2 GB → about 226 MB
  • switching back still works, and nothing was lost in any of my tests (dozens of switches, plus engine restarts)

It's off by default — you add one option to turn it on. Without it, everything behaves exactly as before.

Honest limits. The saving is about 10x, not more: roughly 200 MB of each save is a chunk of the model's internal memory whose size doesn't depend on how long the conversation is, and I don't know how to shrink that. Also, I only tested this on my own computer (Windows, NVIDIA, single GPU) — no idea about Linux, AMD, or multi-GPU.

I hope to see this kind of feature in the main branch someday — conversations kept on disk, and only the changed part written each time.

Originally created by @fqqdc on GitHub (Oct 14, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/2448 **How it was made.** I built it together with an AI coding assistant — it wrote the code, I set the goal and tested it on my PC. The code is here if you're curious: https://github.com/fqqdc/Strata-conversation-cache-delta/tree/conversation-cache-delta (it's #1480 plus my changes). I'm not planning to open a PR — I don't have any experience with that side of things — I just wanted to share it and hear what others think. Hello! I work as a programmer, but this kind of low-level software really isn't my area — I don't write C/C++ and I know nothing about CUDA. **My situation.** One Windows PC (64 GB RAM, RTX 5070 Ti 16 GB). My conversations get very long (up to ~256K), and switching back to one used to re-read the whole conversation every time — 40 to 85 seconds. PR #1480 (`--conversation-cache-disk-only`) fixed that for me: switching back now takes a couple of seconds. Thank you for it. **The catch.** Every time you switch away, it saves the whole conversation to disk — over 2 GB for my 245K conversations. With daily use that adds up to tens of terabytes of writes a year, and I'd rather not wear out my SSD. **What I did.** On top of #1480, I made it save only the part that actually changed. Two small housekeeping things came along: after a restart the cache folder cleans up its own leftovers, and when the folder is full it deletes the conversation you haven't used for the longest time (before, it deleted whichever file happened to sort first — sometimes one you'd just used). Numbers from my own machine: - switching away from a 245K conversation: over 2 GB → about 227 MB (roughly 10x less) - switching away from a 121K conversation: about 1.2 GB → about 226 MB - switching back still works, and nothing was lost in any of my tests (dozens of switches, plus engine restarts) It's off by default — you add one option to turn it on. Without it, everything behaves exactly as before. **Honest limits.** The saving is about 10x, not more: roughly 200 MB of each save is a chunk of the model's internal memory whose size doesn't depend on how long the conversation is, and I don't know how to shrink that. Also, I only tested this on my own computer (Windows, NVIDIA, single GPU) — no idea about Linux, AMD, or multi-GPU. I hope to see this kind of feature in the main branch someday — conversations kept on disk, and only the changed part written each time.
Author
Owner

@fqqdc commented on GitHub (Oct 16, 2026):

A little update. After using this for a few days I went and looked at where the data actually gets written, and it isn't what I expected.

Where it goes. Two kinds of data get written and then never read again:

  • Compacting — by far the biggest part. When a conversation gets long, my client compacts it: it sends the whole conversation out, gets a summary back, and the old conversation is gone for good — nothing ever opens it again. But it had already been written to disk, and it's about as big as a whole context window: around 4 GB on my machine. That one write alone is the overwhelming majority of everything my cache folder sees.
  • The title. Every new chat asks for a title first — a tiny request, about 126 tokens — and that writes a 226 MB file, once or twice per session. Those never get read again either.

What I did. I changed the server so it recognises those two kinds of requests and doesn't save them. That's all it does — everything else stays exactly as it was. It's off by default: a few lines in the settings turn it on, and without them the behaviour is unchanged.

The result. With it on, in one real session, neither the title request nor the compacting request wrote anything at all. My estimate is that in a long working session this cuts the amount written by about 90%, because those two kinds of requests were what filled up my cache folder. That's from my own use, not a proper benchmark.

Scope. So far I've only tested this on DSH, the client I use, and those are the two kinds of requests I could identify in it. Another client would probably need its own setup, but I haven't tried that.

The code is on the same branch as before — three new files:
github.com/fqqdc/Strata-conversation-cache-delta@3c952ebf69

<!-- gh-comment-id:6217635151 --> @fqqdc commented on GitHub (Oct 16, 2026): **A little update.** After using this for a few days I went and looked at where the data actually gets written, and it isn't what I expected. **Where it goes.** Two kinds of data get written and then never read again: - **Compacting — by far the biggest part.** When a conversation gets long, my client compacts it: it sends the whole conversation out, gets a summary back, and the old conversation is gone for good — nothing ever opens it again. But it had already been written to disk, and it's about as big as a whole context window: around **4 GB** on my machine. That one write alone is the overwhelming majority of everything my cache folder sees. - **The title.** Every new chat asks for a title first — a tiny request, about 126 tokens — and that writes a **226 MB** file, once or twice per session. Those never get read again either. **What I did.** I changed the server so it recognises those two kinds of requests and doesn't save them. That's all it does — everything else stays exactly as it was. It's off by default: a few lines in the settings turn it on, and without them the behaviour is unchanged. **The result.** With it on, in one real session, neither the title request nor the compacting request wrote anything at all. My estimate is that in a long working session this cuts the amount written by about **90%**, because those two kinds of requests were what filled up my cache folder. That's from my own use, not a proper benchmark. **Scope.** So far I've only tested this on DSH, the client I use, and those are the two kinds of requests I could identify in it. Another client would probably need its own setup, but I haven't tried that. The code is on the same branch as before — three new files: https://github.com/fqqdc/Strata-conversation-cache-delta/commit/3c952ebf69e06ce406c76f0da3a74739b1d4ab2e
Author
Owner

@Niko1221 commented on GitHub (Oct 19, 2026):

Thanks for taking the time to report this.

We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to read properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected.

To reopen it takes about two minutes:

  1. Re-test on 0.2.0-beta. It may already be fixed. Write down what you see.
  2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other].
  3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system.
  4. Comment /reopen. A check runs and either reopens the issue or lists what is still missing.

The rules are in CONTRIBUTING.md.

<!-- gh-comment-id:6271053289 --> @Niko1221 commented on GitHub (Oct 19, 2026): Thanks for taking the time to report this. We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to read properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected. To reopen it takes about two minutes: 1. Re-test on 0.2.0-beta. It may already be fixed. Write down what you see. 2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other]. 3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system. 4. Comment `/reopen`. A check runs and either reopens the issue or lists what is still missing. The rules are in [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#994
No description provided.