Skip to content
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

Genie apps minimum requirements #68

Open
PGimenez opened this issue Sep 12, 2023 · 3 comments
Open

Genie apps minimum requirements #68

PGimenez opened this issue Sep 12, 2023 · 3 comments
Assignees

Comments

@PGimenez
Copy link
Member

@vrkansagara mentioned having issues getting the VM sizing right when deploying a Genie app. In the workshop, we recommended 2GB RAM for deploying on fly.io. We need to do better estimates and add them to the workflows section in the reference

@PGimenez PGimenez self-assigned this Sep 12, 2023
@essenciary
Copy link
Member

The requirements will depend on the actual app, so we can't talk about "a Genie app".

In our experience, a Genie "hello world" app, either with HTML or JSON output, can fit in 512 MB, ideally with some build stage before the deployment (the issue is the Julia initial compilation that uses some hundreds of MB of RAM, and some of this RAM is never freed -- so apps that don't have a custom sysimg or some other kind of building will need more RAM).

Without some form of pre-deployment build/optimisation, 1 GB should work and 2 GB should be quite OK (ex PkgViz ran on 2 GB on Heroku with custom sysimg).

Beyond these, it's what the user logic needs (ex if you want to load 4 GB of data in memory, you'll need 4 GB just for that).

@vrkansagara
Copy link

My use case was to initially set web service only without anything change. so I also observed that what @essenciary is saying that initial load time taken by Julia it self for the compilation for the first time else it will not require that much RAM.

@essenciary @PGimenez Can we as a Genie framework or any tip or trick to make an initial compilation that can be done in a very very small amount of RAM like 512 MB RAM with a longer time of compilation will be fine.

@essenciary
Copy link
Member

@vrkansagara Yes, we've had good results with building a custom sysimage as part of the Docker build. This adds quite a lot of time to the Docker build phase (can be 15 minutes more) and it's architecture dependent (eg the architecture of the resulting sysimage must match the one of the server, so this was a problem after I switched to Apple's M architecture).

You can see it here: https://github.com/GenieFramework/PkgVizBoard/blob/107ea3011e29dfa885dd6df5b3964bb819b4b3c7/Dockerfile#L25

That being said, as of Julia 1.10 there might be even better/newer ways to build/compile Julia apps, we should review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants