R
RunPod12mo ago
nerdylive

Cost calculation for serverless

if this is my request, then how much am i billed: ( suppose i'm using the 24gb GPU ) { "delayTime": 5981, "executionTime": 7138, .....
13 Replies
nerdylive
nerdyliveOP12mo ago
is it only billed for the "executionTime": 7138,?
Justin Merrell
Justin Merrell12mo ago
Cold start + execution. If your worker performs actions such as download models before the handler is called you will also be billed for this time.
nerdylive
nerdyliveOP12mo ago
Oh OK but which is the cold start time Is it included in the execution time?
Justin Merrell
Justin Merrell12mo ago
No, it is prior the execution time. Not something that can easily be reported for a specific request. There should be a cold start time chart on your endpoint page
nerdylive
nerdyliveOP12mo ago
Oh Yaya ok thanks ill check that hmm is there a guide to estimate my costs also i've seen my execution time for the first time after the worker is launched is taking way longer like 40 secs ++ than usual why is that then it became faster like 6 secs
Justin Merrell
Justin Merrell12mo ago
May you shareyour handler file/code?
nerdylive
nerdyliveOP12mo ago
im using the sd webui, the handler waits for webui service like the ashleyk's one i modified it abit, to wait sd webui only if using sd's apis because there is some other helpers api to download file and upload file
Justin Merrell
Justin Merrell12mo ago
Sounds like it is these initilizations that run on the first request that are taking a while and then once they are ran everything else after is faster. If you can move this step outside of the handler then your execution times should become more consistent.
nerdylive
nerdyliveOP12mo ago
so its counted as the "cold start time"?
Justin Merrell
Justin Merrell12mo ago
Correct
nerdylive
nerdyliveOP12mo ago
ah okay but it doesnt really matter right ill just keep it this way lol, also thanks for the info
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
flash-singh
flash-singh12mo ago
no, downloading image happens in background and outside of billing cycle
Want results from more Discord servers?
Add your server