Optimization, optimization !

Jérôme Granados / Sébastien Simoni / Katia Jannin on Tuesday, October 7th 2008 I 0 Comment

Optimization, optimization !
Web server, SQL server, file server, ... it's so not pleasant being a server at WMaker, trust me. Why? Few figures will illustrate the efforts suffered by our 30 physical machines (equivalent to 120 virtual machines). In short, here's what we require that they do to get your websites to be the most pleasant to visit and manage :

- serve 2,5 million pages a day,
- beat back 10 span attacks on the mails each second.
- block 1 robot intrusion attempt each second
- Stop the spam publication in comments, trackbacks, forums, forms,... About that, we thank the users that warn us about the messages that go through the stops, it permits us to be more watchful.

Add to this the SNS, the new headlines modules and the video, and you'll find yourself with always heavier pages, so more work for the servers. Because, it may not be obvious but, for few months, the bandwidth use is hugely increasing.

It's normal, and very good news! It means that your sites are successful, that your users are greatly communicating, in short... that they feel good at your's.

The application is evolving a lot and so we need to do a little break in the newness, in order to optimize the whole thing and keep the bases strong.

We've decided to hunt down the response time. Our goal: improve the architecture performances to optimize the page service.

To do so, it's necessary to work on many levels. Those operations are invisible to the user but are very important for the application global functionning.


UTF-8

This first invisible but significant modification is the text-encoding in UTF-8.

It's a character encoding norm that has the advantage to be the largest common denominator between all the alphabets.

Until now, we were keeping a Charset for each alphabet type (more than ten in all). This became very heavy to manage, notably for the japanese and arabic WM versions. We were even afraid to start with the chinese version.

Thanks to UTF-8, you will be enabled to write in different languages, whatever their alphabet specificities are, and all that in the same website!

But the other side of the coin is that the switch to UTF-8 leads to bugs displaying characters with accents. We've solved this week all display problems, except  the HTML articles for which the work is not finished yet.
Thanks to warn us, via your site support, the URL of the pages where you see weird characters. As for us, we're checking all sites one by one.

Wrapper SQL

In order to obtain the best results, we're equiping ourselves with new analysing tools, way more powerful. They'll enable detecting the application zones where it's possible to gain time and reduce the response time.

For an exemple, we've switched a whole part of the application, on a SQL wrapper. The wrapper is an abstraction layer with the data base.

The wrapper rewrites the SQL query and takes charge of executing the most available data base.

The wrapper also feeds a dashboard with the most frequently treated-by-SQL-server queries. This will enable us to optimize as a priority the most used application parts.

Software optimization

We're also working on other software aspects to remain efficient. This concerns for an exemple:
   - the analysis and rewriting of certain parts of Php code in order to preserve the engine resources (processor treatment )
   - the wise use of the cache in certain parts of the application.

We've targeted to increase the speed by 50% by the end of the year.

Material investment

All isn't only based on the software optimization, but also on machines.
We've invested in 8 new overpowerful servers. They are SUN Bi-Xeon QuadCore servers, each with 16Go RAM. They don't require much energy. The processors eat only 50W.

We'll install them in the data center on October 15th, because, we've just end up our talks with OVH to obtain more hosting capacities in our bays.

In a conclusion

Software speaking, here's what to foresee by the end of next week. Be aware that some slowdowns and perturbations can appear during the optimization works. That just a short bad time to go through.
Considering the results we except, all that we'll be quickly forgotten.

After the optimization and the installation of the new servers ( that will lead to 38 physical machines of ours ), it will be time for innovation, but we'll talk about that later...




New comment:
Facebook Twitter