-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added "defaultMemoryMbytes" to actor.json #55
base: master
Are you sure you want to change the base?
Conversation
// Used when user doesn't specify memory, the 𝔸ctor run will start with this amount. | ||
// It might be a basic arithemtic expression referencing ${variables} from Actor input. | ||
// This right value can optimize user experience vs. compute costs. | ||
"defaultMemoryMbytes": "${maxCrawlPages} * 256 + 128", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we sure we want to have it this customizable? Right now the memory has to be a power of 2, which would be hard to enforce with a custom expression. We could relax the "power of 2" requirement, but I'm a bit worried about the implications on job allocation to workers if we allow completely custom memory.
Also it might be more readable to put defaultMemoryMbytes
between minMemoryMbytes
and maxMemoryMbytes
, to make it a bit more clear that the calculated value is clamped from both sides, and have one comment for all three together.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right now the memory has to be a power of 2,
We could say we always ceil it to the next higher value available by the platform. This should apply to all three parameters.
Are we sure we want to have it this customizable?
I think it's better to use an expression rather than some A and B linear coefficients.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this. This would probably remove the need to have charge the actor-start per GB or maybe charge it at all. No, this is just a default, they could override it so we would still have to charge per GB for the wrong configurers
In theory in the future we might disable ability to select custom memory, or per developer setting. This opens the path. |
BTW perhaps this would be cleaner:
What do you think guys? |
How about this?
memoryMbytes: {
min: 128,
default: "${input.maxCrawlPages} * 256 + 128"
max: 4096,
} |
IMO it's better to keep just
|
Or maybe we could make it even more generic and future proof:
Plus I agree with |
see https://apify.slack.com/archives/C010Q0FBYG3/p1733154485910689