mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #6717] [Issue]: Decision sidecar's first answer after each start is slow, so Test shows warm-up time instead of its real speed #3764
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#3764
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 @kolacheee on GitHub (Sep 26, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6717
Originally assigned to: @kolacheee on GitHub.
The decision sidecar's first answer after it starts is slow, and every answer after that is fast. The Test button is usually that first request, so it reports the warm-up time. A user who clicks Test once reads "2 seconds" as the model's normal speed.
How to reproduce (try it yourself)
What you'll see: the first result is about 1.4 to 2.3 seconds ("Answered 0.910 in 2279 ms"), the second about 0.09 seconds ("Answered 0.910 in 87 ms").
What should happen: the first Test shows the model's normal speed.
Measured on staging
77d4b0e57, RTX 5090 Laptop:The model server's own
inference_secondsmatches the first number, so the time is spent inside the model, not in HTTP. It happens on every start, whichever start policy is chosen. Test's reported time never includes the process start, only the request.Where it is
packages/server/src/services/sidecar/decision-process.service.ts,start(): the address is published as soon as the server prints its{"url": ...}line, and nothing asks it a question first.What's happening
The first inference after loading pays a one-time GPU setup cost. Nothing pays it before the first real question, so the first gate or Test after each start does.
Suggested fix
In
start(), after the URL line and before the address is published, send one small question shaped like Test's. Callers already wait on the load, so the first gate and Test then see the normal speed. A failed warm-up should not fail the start, and a stop during it should still cancel the start.Context
Reported by a user. Staging only (#6556). Investigated with an AI agent; verify before fixing.