How much memory is really available on your Linux box? Don't use /proc/meminfo to find out, use free -m instead. You may have more memory available than you thought. Here's an example. /proc/meminfo says about 330MB is free: ~ $cat /proc/meminfo MemFree: 340996 kB .. free -m gives the following: ... Read more
Mint is a shiny new elixir package which allows you to make HTTP requests using the HTTP 1, and HTTP 2 protocols. Let us see how we can start using it to improve our web apps performance. Read more
When I do a code review, one of the scariest things I see is logic like this: if Rails.env.production? do_additional_work end Why? Your beautiful tests and tightly integrated CI system won't execute that code. You won't see that code execute as you refresh your browser in development. From syntax errors ... Read more
Rails dominates Ruby web frameworks: the next most popular framework, Sinatra, has 5% of the popularity of Rails . However, that doesn't mean non-Rails frameworks like Sinatra and Grape don't have their place. When does it make sense to step away from ActionController and use another framework? What are the ... Read more
There are at least three ways in which you can control how much CPU time a process gets: Use the nice command to manually lower the task's priority; use the cpulimit command to repeatedly pause the process so that it doesn't exceed a certain limit; use Linux's built-in control groups, a mechanism which tells the scheduler to limit the amount of resources available to the process. Read more
Using the right Ruby interpreter to run your programs can make all the difference. Unfortunately, it can be tough to find resources about different Ruby interpreter options, or about how to choose the right one. Below, we’ve compiled a wealth of information about interpreters in Ruby. Even if you start this article asking "What is a Ruby interpreter?", you’ll learn exactly what you need to know to make the right decision. Read more
A couple of years ago I visited Argentina. I have trouble enough pronouncing my limited English vocabulary and I don't speak Spanish, but after a bit of time, it was pretty easy to order food, buy groceries, and use a taxi. However, occasional hangups that happen during my regular life ... Read more
Most scientific papers are unlikely to change your day-to-day approach as a Rails web developer. How not to structure your database-backed web applications: a study of performance bugs in the wild Yang et al., ICSE'18 is the exception to that rule. This study examined 12 popular, mature, opensource Rails apps ... Read more
Once your Rails app begins seeing consistent traffic, slow SQL queries will likely rear their ugly head, but how can you easily tell where your app is slowing down? Read more
Prior to adding Python performance monitoring , we'd written monitoring agents for Ruby and Elixir . Our Ruby and Elixir agents had duplicated much of their code between them, and we didn't want to add a third copy of the agent-plumbing code. The overlapping code included things like JSON payload ... Read more