UPDATE: Moving from CodeIgniter to Lumen

A while ago, I made the transition from CodeIgniter to Lumen and I wrote about it in a post about picking the right PHP framework for a SAAS membership site...

What I needed was a super lightweight and fast PHP framework to build out all of my MVP ( minimal viable product ) ideas, I chose Lumen by Laravel...

Little did I know HOW MUCH changing from CodeIgniter to Lumen would impact my server performance...

What happened next was CRAZY...

Below is an image of my server memory statistics the day that I pushed live the framework change from CodeIgniter to Lumen...

server-memory

The HUGE dip in memory usage was completely an unexpected performance boost... I figured that CodeIgniter was using a bit memory, I just didn't know the extent of the memory hogging that was going on...

Thinking perhaps this was a temporary thing, maybe the hosting company rebooted my server or somehow MySQL connections got reset...

How could Lumen really free up that much memory on my server right? Could CodeIgniter really be using that much of my total memory?

So I decided to wait a bit longer and then followed up with another screenshot that you can see below...

memory-statistics-2

About two days later, I took another screenshot of the memory statistics, the codebase now using Lumen by Laravel instead CodeIgniter showed just how much memory was NOW available...

Aside from some heavier cron jobs run in the early hours, most of the day is pretty steady now using Lumen as the PHP framework...

Just to be sure... I took another screenshot this morning of current memory usage, that's three months later and the screenshot is almost an exact duplicate of three months ago...

NOTE: I actually squeezed out slightly more memory with some code changes, so there is a bit MORE memory now available than three months ago!

memory-statistics-3

Steady and much faster with more memory available to handle sudden spikes... Very happy with Lumen from Laravel and would recommend it to anyone looking to build their next PHP project...

Before you upgrade your server...

Take a look at your framework... I know it's a pain to think of migrating to a new framework, the cost and time involved is nothing to take lightly, especially with larger projects that require code and content migration...

Year over year, you could actually benefit your business if you take the hit now and move to a framework that would enable you to use the money saved to re-invest into your business rather than handing it over to a hosting company for extra memory or servers...

Running lighter and leaner could end up providing a higher ROI when you take into account the cost of VPS or cloud hosting versus pumping that money back into your business...

It's easy to keep upgrading hosting, adding more memory or servers, even if you have deep pockets, eventually hosting fee's can get out of control...

But, when was the last time you looked at your codebase or framework? You could be leaking money and lot's of it!

2 comments

  • hi cesar,

    The results are amazing, good job!
    definitely I give it a try to Lumen 🙂

    some question here, which software are you using to check the server memory statistics in these graphs?

    thanks and Good luck on your journey!!

    -- Miquel Camps Orteza

  • Hi Miquel, I monitor the graphs my hosting company provides, not sure what they are using to generate the graphs.

    Both Lumen and Laravel have been better solutions than CodeIgniter, I have been testing other micro php frameworks, for now my go to frameworks are Lumen and Laravel.

    HTH
    😉

    -- Cesar Serna