|
|
|
|
|
by mh-cx
3076 days ago
|
|
Yeah, and they've promised to work on performance for ages now with almost no improvement. I run a very small installation with only a couple of projects and some hundred issues on a 4 GB machine. It eats up 2 GB (sigh!!!) - and often still feels extremely slow. I mean 2 Gigabytes!! What for? That's a multitude of all the data I have in the DB there. And then it's not even used for something useful like caching. Some pages take several seconds to load. As a developer that's totally unacceptable to me. Is ruby really such a mess that it's impossible to run an app with reasonable memory consumption? |
|
Yes.
Any non-trivial Ruby app will quickly eat up 500MB, and any non-trivial Rails app will soon balloon to 1GB, with things getting worse over time due to memory fragmentation†. Since there is no parallelism your only option is to either have more unicorn workers, for which prefork and COW are hardly working to save you from duplicating memory, especially over time, or have puma threads and use JRuby, which is a memory hog of its own and often slower than MRI.
There have been arguments made that developer time trumps CPU time [0] but there are some workloads and problem domains and uncontrollable events for which this works at the beginning yet later on you find having yourself painted into a corner as suddenly things are not sustainable because you just can't throw more hardware at the issue without going belly up[1]. Once the low hanging fruits have been reaped you're being challenged just to make your app behave within established parameters with diminishing returns, which I'm sure you'd rather spend on solving actual problems for your customers. At that point you might just as well spend the money on rewriting part or all of your app in a more frugal ecosystem and mindset[2].
† Switching to jemalloc may or may not help. Over here it did not.
[0]: https://m.signalvnoise.com/ruby-has-been-fast-enough-for-13-...
[1]: https://twitter.com/migueldeicaza/status/950054181045440518
[2]: https://twitter.com/lloeki/status/950079609051152384