Good morning.
Ma tie
I’m doing some performance testing of my Clojure app, and it seems the bare minimum will happily eat 350MB of RAM (Jetty with 6 threads, the minimum). As soon as I add Nashorn, it jumps to >512MB. Is this common or am I experience a problem here? Clojure/Java being memory hungry might have an effect on whether I use Heroku or not.
morning
måning
hi
ola
u cant do ola
jon. or can u? eh... :D
Morning
Or afternoon now..
hola
@pupeno: ime the jvm isn't super fast/happy until it has ~3gb of ram. Not surprised you have issues on Heroku
I just published what I think it’s the most comprehensive blog post in how to use New Relic with Clojure: https://carouselapps.com/2015/09/07/using-new-relic-with-clojure/
tcrayford: is that personal experience?
yes
I do actually work for Heroku as well though 😉
certainly I've run java apps on Heroku at well under the 512mb limit though
For a few more experiments I think I’ll use big heroku instances for now for some experiments but then I’ll move to VPSs.
Probably just deploying with capistrano.
I'd uh, recommend using bash or something over capistrano
unless you know cap real well
(it's kinda bad imo)
I do know capistrano as I use it already. Using bash would mean having to build a lot of plumbing that capistrano does for me.
fair enough then :simple_smile: It depends how complex your deploys are. Yeller's deploy system doesn't keep around old deploy artifacts or anything like that, just shoves a file in a place and kills the existing process
Well, you also need to run it on all the servers, run migrations, etc.
I do like having the option to rollback, although I never used it in my life.
Also, are people just deploying uberjars that run standalone? No container like Tomcat? I’m new to the Java world so I don’t know if it’s a good idea to just run the uberjar.
clojure standard is uberjar
don't have leiningen on your production machines
just embed jetty or whatever
Cool. That’s simple enough.
tcrayford: thanks for pointing it about 3GB of ram. I’m running with 1GB and I can’t go above 0.9 hits per second.
😮
I mean, on average.
yeah that's still very slow
I'd expect the average clojure/jetty app to hit ~10k requests/s if it's completely unperformance tuned and not doing too much weirdness with the db
maybe more like 70k-100k if it's still http and tuned somewhat
I’m going to try again with up to 20 virtual concurrent users.
But I do have Jetty limited to 10 threads, trying to stay within the RAM constraints.
Responses are fast though, 78ms.
It seems the JavaScript implementation, Nashorn, is very memory hungry.
oh, you're hitting js on each request? that's likely the problem imo
tcrayford: this is what I’m testing.
I will think of ways to not execute JS when it’s not really needed, but first, I want to understand the performance of it.