On 08/12/2015 05:24 AM, Brian Adkins wrote:
I just installed 6.2.1 on a Linux VPS via the "Unix Source + Built Packages",
and the install went smoothly. I created a standalone executable of a simple IRC bot I'm
putting together via:
raco exe ircbot.rkt
When I run it the vsz=209440 and rss=63396. ~ 64 MB seems a little high to me.
Are there any arguments I can supply to either raco when creating the exe, or
to the exe when running it, that might reduce the runtime memory consumption?
In other words, is Racket possibly pre-allocating large chunks of RAM that I
can limit?
I'll post the source to the ircbot later, but it's really minimal at this point
- opens a TCP connection to the freenode server and an output file channel for
some logging, not much going on. I just ran a test with a file that has only
(sleep 60), and it used about 50 MB RAM.
Change "#lang racket" to "#lang racket/base" and import manually each
lib used by your code. Also, run "raco make yourscript.rkt", it reduces
slightly the memory used by racket.
With both changes, I see a reduction of RSS from 47.5 MB to 14.5 MB in
your (sleep) example.
--
You received this message because you are subscribed to the Google Groups "Racket
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.