# Julia vs. Java on embedded

**URL:** <https://discourse.julialang.org/t/julia-vs-java-on-embedded/58032>\
**Category:** General Usage\
**Tags:** question\
**Created:** [March 26, 2021, 5:11pm UTC](https://discourse.julialang.org/t/julia-vs-java-on-embedded/58032 "2021-03-26T17:11:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [March 26, 2021, 5:11pm UTC](https://discourse.julialang.org/t/julia-vs-java-on-embedded/58032/1 "2021-03-26T17:11:16Z")

</div>

We are working with an embedded device similar to a Pi 3 (well, perhaps in one or two years like a Pi 4) and use Java for our GUI application. We have now 2GB RAM, extending that to 4GB would be possible.

Perhaps as clarification: The GUI is a web browser, the java app is creating html.

What is the RAM usage of a Java application versus a Julia application?

Does anyone have any reasonable benchmarks?

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [March 27, 2021, 4:28pm UTC](https://discourse.julialang.org/t/julia-vs-java-on-embedded/58032/2 "2021-03-27T16:28:26Z")

</div>

> [@ufechner7](#):
>
> What is the RAM usage of […] a Julia application?

I imagine this depends a lot on your application, but to get a baseline you could run the example server from

> **[GitHub - JuliaWeb/HTTP.jl: HTTP for Julia](https://github.com/JuliaWeb/HTTP.jl)**
>
> HTTP for Julia. Contribute to JuliaWeb/HTTP.jl development by creating an account on GitHub.

and check.

---

<div class="post-metadata">

**Author:** ![Jeff\_Emanuel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jeff_emanuel/32/15440_2.png) [@Jeff\_Emanuel](https://discourse.julialang.org/u/Jeff_Emanuel)\
**Post date:** [March 27, 2021, 4:39pm UTC](https://discourse.julialang.org/t/julia-vs-java-on-embedded/58032/3 "2021-03-27T16:39:13Z")

</div>

> [@ufechner7](#):
>
> RAM usage of a Java application

This is largely determined by your Xmx setting to the JVM. The JVM will typically (eventually) use all of the heap memory available defined by Xmx. Other relevant settings would include the per-thread stack size settings. I haven’t seen any reference to such control in Julia. Discussions here [Limit Julia Memory](https://discourse.julialang.org/t/limit-julia-memory/34409) and here [Julia vs. Java on embedded](https://discourse.julialang.org/t/julia-vs-java-on-embedded/58032)
