ollama unloads the model after 5 minutes and first token takes 38 seconds ollama
Small internal tool, maybe 40 requests a day in bursts. If two people use it within a few minutes it is instant. If nobody has touched it for an hour, the first request takes 38 seconds before a single token appears, then normal speed after that.
20GB model on a SATA SSD. I assume it is being unloaded and read back off disk, but I would like to confirm before I buy an NVMe drive that might not fix anything.
@two_calendars · 8h ago · 3 replies
Your 38 seconds is arithmetic, which is a nice confirmation: 20GB off a SATA SSD at about 530MB/s is 37-38s of pure read. That is exactly your number, so nothing else is wrong.
An NVMe at 3.5GB/s would make it about 6 seconds, which is a real improvement if you ever do need to reload - but keeping it resident makes it zero, so fix that first and buy the drive only if you end up juggling models.
Reply
Report
@bedtime_bargain · 3h ago
The fact that the number matched the drive spec so exactly is the most satisfying debugging moment I have had this year.
Reply
Report
@teardown_tues · 3h ago
Worth doing this arithmetic any time a load feels slow. If your measured time is well above file size divided by drive speed, the disk is not the bottleneck and you are about to buy the wrong hardware.
Reply
Report