Skip to content

Smartcache slot dump in ssd or hdd #2667

Backlog

Description

@xelercen

KoboldCpp has SmartCache (--smartcache), which keeps KV cache snapshots in RAM.
Any chance we could get an option to dump those snapshots to disk instead — an HDD or SSD?

That would be a massive win.
Say I want 100 cache slots and each snapshot eats ~2 GB — that's 200 GB of RAM just for cache.
Storage is dirt cheap compared to RAM, so let me park those slots on a drive instead.
Two big reasons I want this:
I'm not swimming in RAM, but I've got drive space to burn.
Reboots wipe everything.
I'd like my 50–100 slots of 150k-token context to survive a restart instead of evaporating every time I reboot the box.
I realize constantly writing that much data will wear an SSD down faster, especially QLC drives (4 bits per cell), but honestly that's a trade-off I'm fine with.
Switching between multiple requests means that most of the time is spent processing the prompt rather than on generation. This is especially noticeable when using a CPU without a GPU.

Will this be implemented?

Activity

  1. LostRuins commented on Nov 27, 2026

    @LostRuins
    Owner

    Unfortunately, at the moment, it's not possible to use disk cache for the smartcache slots explicitly, but you can likely achieve the same effect by using a pagefile (on windows)

    Search how to configure a custom-sized Virtual Memory paging file (pagefile.sys) for that drive

    https://win10faq.com/how-to-use-your-hard-drive-as-ram-in-windows-10/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions