What drives CPU costs?
sweetmoneydeal
HOBBYOP

a year ago

I bought a $5 plan and I am pretty much a noob. My projected CPU costs is saying $13 this month. My site has almost no traffic and I'm just using it for an app I am toying around building. What is driving this cost? How can I reduce it?

Solved

8 Replies

a year ago

The only thing driving CPU cost is CPU usage, there's very likely something in your app that's causing that amount of CPU usage. For reference, I have a project with 17 running services totaling 20 deployments (including replicas) and its total CPU usage is comparable to yours..

What kind of website is it? What're you running?


dev

The only thing driving CPU cost is CPU usage, there's very likely something in your app that's causing that amount of CPU usage. For reference, I have a project with 17 running services totaling 20 deployments (including replicas) and its total CPU usage is comparable to yours..What kind of website is it? What're you running?

sweetmoneydeal
HOBBYOP

a year ago

I'm making a game. This is more of a test of AI capabilities rather than a build of necessity. I am using HTML with Node js and Mongo DB. The code is exclusively built with Cursor AI. I have asked Cursor if node js is required and several features of my game require node js. I have asked Cursor to recommend optimizations to lower CPU usage and it has given me about 10 recommendations that i am implementing today and I will see if that helps mu projected cost.

I thought I read somewhere that there was a way to schedule access to the server so that it only runs when it is being used rather than having it run 24 hours a day. If I could only run it between 12 noon and midnight (EST) would that cut my CUP usage in half? Is this even possible. I may opt later to run it full time but for now it's just me accessing it while I develop and a limited few testers all working in the same time frame.

If you have any other suggestions that might be helpful blanket ways to reduce CPU I would appreciate your advice.


a year ago

You might be interested in serverless then, it'll put your service in a sleep mode and will wake up when used and go back to sleep when not in use and it doesn't draw usage while in sleep mode, only caveat being that waking the service up takes a few seconds

You'll see an option for serverless in your service settings


sweetmoneydeal
HOBBYOP

a year ago

This sounds good. Once the service wakes up how long does it stay awake before it needs to be started again? Can that be custom configured?

I really appreciate the fast response and the helpful suggestion!


dev

You might be interested in serverless then, it'll put your service in a sleep mode and will wake up when used and go back to sleep when not in use and it doesn't draw usage while in sleep mode, only caveat being that waking the service up takes a few secondsYou'll see an option for serverless in your service settings

sweetmoneydeal
HOBBYOP

a year ago

I actually found the answer to my question in the documentation

"If no packets are sent from the service for over 10 minutes, the service is considered inactive."

Thanks again for your help!


a year ago

Awesome and no problem


Status changed to Solved dev about 1 year ago


Status changed to Awaiting Railway Response sweetmoneydeal 12 months ago


dev

Awesome and no problem

sweetmoneydeal
HOBBYOP

a year ago

Hi Dev,

I switched my site to serverless mode but my expected CUP costs haven't fallen. I have backtracked in my development for now and I am trying to find where this CPU use is coming from. While I do that my online app is not being used. Is there a way I can stop all of my services without having to delete the services so that I can maintain the database and the custom variables I have set up? I really want to stop whatever is causing this cost until I understand it better.

Thanks in advance for any help you can provide.


parmstar
EMPLOYEE

a year ago


Status changed to Awaiting User Response Railway 12 months ago


Railway
BOT

7 months ago

This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!

Status changed to Solved Railway 7 months ago


Loading...