GameSense.Co Video Games

Performance Improvements

The Problem

After some time, we noticed that Game Sense was not running properly. Our CPU usage and memory seemed alright, and our servers weren't being overly loaded, however, there were some odd traffic patterns and signs that something was not quite right. We began investigating and eventually found out that pages would come to a crawl as far as speed was concerned, and the site wouldn't be scaling as well as we would like. We did make some mistakes developing, primarily we relied on profiling PHP performance and Apache Bench requests per second as a metric of how well the site would run. Turns out, the site does run fine and the code for Game Sense is quite good. Our problem was we knew the site wasn't loading and running properly, yet the common signs of a server (no memory, maxed out CPU, maxed out I/O, etc) weren't showing up.

The Solutions

We didn't really know where to start, so we began optimizing the code some more. One of the first things we did was move from PHP 5 to PHP 7. PHP 7 is a lot faster, and uses less memory. It's a very good upgrade to have, and we finally made the jump. Part of what took so long had to do with some extensions we had that never got ported to PHP 7. But we replaced the functionality of those extensions with other solutions and the jump to PHP 7 was successful. The change doubled our performance on our development machine, from around 400 requests per second with caching enabled to around 800 requests per second. Even after updating the site, we didn't see the improvements we hoped.

Game Sense works on a fully custom framework, with the most performance sensitive parts written as in C/C++. As Game Sense and the framework grew more and more complex, the situations that we optimized in C/C++ were not being hit as much as the alternative means. So, we moved those parts to C/C++ instead of PHP and optimized it a ton. This gave us another roughly 400 requests per second with caching enabled on our development machine, bringing the total up to around 1,200 requests per second on our development machine. But, that still didn't do it. Needless to say, we've been fighting this for quite some time.

Finally, we began tweaking server settings, which helped, a lot. It seems our servers were somewhat misconfigured, or at least far from optimal.

We're finally getting some progress done with this, it seems like it's almost entirely fixed. Though, we're not quite sure if it was only the server configuration or the other optimizations we made. We are, however, pretty happy with the end result of all of this. The site is running miles better and the signs of problems being there are now gone. To top it off, these changes mean we have temporarily avoided problems with funding, since the cost to run Game Sense has not gone up, but the amount of pages we can give you guys has gone up dramatically. Being self-funded and focusing on honesty means we can't take money from developers, publishers, etc like most other gaming sites, and having a major performance advantage over other CMS and frameworks is a key to that.

Some other issues were fixed or optimized as well. We also improved our error reporting tools as well as our in-house query examiner to help speed things up.

Browser Experience

We have known the old skin for Game Sense was not running well on some older devices, specially on browsers that don't work so well anymore, like Firefox. For those of you inconvenienced by this, we are sorry, we have been overwhelmed. As you can probably guess from tech discussion above, we're quite understaffed. We were finally able to get around to optimizing the skin, but it was easier to start all over. You may notice Game Sense looks a lot cleaner now. You will probably also notice scrolling on the page is smoother, and it's just nicer to use when you're on a mobile device.

Optimizing the way the site looks like let us finish some really requested features, like a night mode. You can now enable the night mode by clicking on the at the top of the page, in the notification center.

Interface

We also made some pretty big interface changes too. The menus are mostly re-worked. We have not liked them for a while, but now we are somewhat happy. Now you have icon, which takes you directly to the page, or the text below which opens up the old menu. This should make getting around a lot easier.

We got rid of the breadcrumb, we felt it was making the site needlessly complicated and overwhelming people. It also wasn't working reliably as we added more features. Clicking on an earlier breadcrumb wouldn't take you to the right place, which defeats the purpose of the breadcrumb. We did move some of the functionality, like sorting video games, to the main area with all the video games instead. This should make it a lot easier to sort video games.

The new skin is much more modern and simple. It's a bit easier to read and doesn't feel so out-dated. We have been slowly evolving this skin for the last week or so, and we're finally happy with how it is.

We have been really busy, but things are looking up. We are extremely satisfied with the new performance improvements, the site feels good even when it's under some pretty heavy load. Something that I couldn't say before, specially when I'd personally go to the site to check up on it during peak hours and it'd be too slow.

Be the first to comment!
Did you know you can earn WAD to promote yourself on GameSense.co and your level will increase, giving you more influence on how you change scores?