-
Notifications
You must be signed in to change notification settings - Fork 56
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
Limit the size of the bundle to be deployed #382
Comments
👍 |
1 similar comment
👍 |
Is this related to #383? Or this a separate check to make sure there is room for the bundle before deploying? |
There are two parts to this:
|
What about room for execution? Should we report back available memory after deployment? Maybe color code if it's below a certain threshold? |
@rwaldron we should probably leave some amount of spare RAM for the user application. I'm not sure what a decent amount is though :/ Maybe a few MB? |
@johnnyman727 @dtex agree with both things. The previous part of the puzzle was just a mechanism to make the data available. All we need to do is decide how much we want to spare and go from there. |
I think we can set an arbitrary spare RAM limit like 10MB and just see how well that works. Soon after launching, it would be awesome to put some analytics on the CLI and see what the average bundle sizes look like. |
The fix for this will be located in t2-cli/deploy.js. Here's the function that deals with memory information: https://github.com/tessel/t2-cli/blob/master/lib/tessel/deploy.js#L37 |
Tessel has 64MB of RAM but not all 64MB are available because OpenWRT is running other processes and has some files (like
/tmp
) mounted in RAM.Currently, you can try to deploy however large a bundle you'd like which could probably really mess up OpenWRT.
For now, we can check that the bundle is 32MB or less but we should eventually ask OpenWRT how much memory is free before deploying and limit it to that amount.
The text was updated successfully, but these errors were encountered: