this post was submitted on 10 Sep 2023
2 points (75.0% liked)

Raku

157 readers
2 users here now

A place for all things related to the Raku® Programming Language—an open source, gradually typed, Unicode-ready, concurrency friendly programming language made for at least the next hundred years. Please join us, for programming should be optimized for Fun and Profit!

Links

We are a bunch of volunteers developing the Raku Programming Language as the Open Source language of the future.

We also develop tools, web-services and applications written in the Raku Programming Language.

We try real hard to be nice to each other. You can help too! The only requirement is that you know how to be nice to all kinds of people (and butterflies 🦋). And don't be afraid to ask if you do not understand something.

founded 1 year ago
MODERATORS
 

I did comparison of a hello world web service in a few programming languages to get an idea of how much memory each of them consumes from the start.

Raku started consuming 345MiB. Is it expected, or is it something wrong on my test?

I used this dockerfile:

FROM rakudo-star
RUN apt-get update
RUN apt-get install -y libssl-dev
RUN zef install Cro::HTTP --force-test
COPY . /app/
ENTRYPOINT ["perl6", "/app/app.raku"]
top 1 comments
sorted by: hot top controversial new old
[–] lizmat 2 points 1 year ago

Cro is a rather large package intended to run full blown interactive services multi-threaded. So that does not seem out of place.

However, the amount of memory "used", may actually be a lot less in reality. For instance, if a run:

$ raku -e 'say Hello World"; sleep'

on MacOS with an M1, Activity Monitor reports that as using 82.4MB. But if I let the system itself report what its max_rss was for a process, it reports as 140KB. So I'm not sure if the MB number indicate actual memory usage, or just potential usage.