Performance improvements with Oplog! (MUP deployment on single server)

#1

My app is deployed with MUP to a single server [1] with mongo on the same server [2].

I’ve been using MUP for a few years and never noticed that oplog support for the local mongo had crept in. Using oplog is as easy as adding a single line to your mup.js.

I did this yesterday at around 16:00 local time, and the performance improvements are amazing! Here’s the past 24 hrs worth of data. My demand (concurrent sessions) peaks and troughs daily so the start and end of each 24 hr graph represent similar (approximately peak) load levels:


Summary results (averaged over 1 hour) at peak load of 10am to 11am local time, before and after:

         |   CPU  |   RAM  | Fetched documents | Method response | Sub response
Before   | 10.03% | 264 MB |        586 k      | 74 ms (n=425)   | 29 ms (n=853)
After    |  4.95% | 234 MB |        153 k      | 28 ms (n=370)   | 29 ms (n=968)
% Change |   -51% |   -11% |         -74%      |  -62%           |  0%

btw, if you’re not using app performance monitoring yet I highly recommend https://montiapm.com/ by @zodern, even the free tier is really useful.

[1] Digital Ocean $5/mo Ubutnu server.
[2] I know app and db on the same server isn’t recommended, but it’s worked faultlessly for a couple of years, is appropriate for the current demand and low risk nature of this app, and I have good backup processes in place (although so far I’ve never needed them).

4 Likes