35 ms·
Java / Scala can get dicy on $5 host. Problem 1) SBT cannot run with 512 ram, so you cannot compile locally. If using phat jars, that means you need to upload
by brianwawok 11y ago
Java / Scala can get dicy on $5 host.
Problem 1) SBT cannot run with 512 ram, so you cannot compile locally. If using phat jars, that means you need to upload a 100mb jar every time you want to deploy, vs just a git pull and a build. May or may not matter to you.
Problem 2) Once you start doing some actual work, the JVM itself is taking up a few 100 MB of ram, and the OS takes up a fair bit.. this leaves something like 128MB ram for your app best case.. for a lot of apps this is not enough. I had to go up to at least 1 GB VMs to get my medium complexity Scala app to work in prod, and I have been tuning JVMs for many years.
- merb 11y agofallocate -l 4G /swapfile chmod 600 /swapfile mkswap /swapfile swapon /swapfile swapon -s Works pretty well. You can't actually run too much on it however if you use a tomcat you actually get a decent Request per Second something like 100r/s. And you don't need 1GB VMs. 512 MB Scala Apps are working fine. It just depends on the technology.