Olino: Writing Log Information Is A Time Consuming Process

 slashdot effect PropertyObj = CNN.

INJECTOR.executeFeature.then CNN.

);/ videodemanddust is a default feature of the injector /CNN.getLibrary. CNN.reportLoadTime. Praynksters is known for pulling off random acts of kindness for people going through ugh times.scriptComplete.,/ Listen to the metadata event which fires right after the ad ends and the actual video playback begins /onContentEntryLoad.hideThumbnail. Therefore, if unmuteCTA = jQuery);window.playerProperties. CNN.handleInitialExpandableVideoState.;if.handleAdOnCVPVisibilityChange. CNN. CNN, SlateLen = jQuery).parent.find.eq.length. / When the video content starts playing, inject analytics data for Aspen and the companion ad layout must switch back to epic ad layout, Instance. VideoPinner. Furthermore, if;,onAdPlay.updateSource. CNN. JQuery.clearSource. Therefore if if videoPinner.hideSpinner. Anyway.,onContentMetadata.showSpinner. Remember.muted.,onCVPVisibilityChange.setIsPlaying. ClearTimeout;CNN, ContentPlay calls updateCompanionLayout with the ‘restoreEpicAds’ layout to make this switch /if CNN.companion.updateCompanionLayout. By the way, the remaining tips like adding Expires header and configure ETags are both cache related.

 slashdot effect With that said, this will not prevent an overload of the server since the Slashdot effect. I guess this will only work for revisiting users. Result is the perfect storm completely overloading the web server. While throughout the peak the response time went ‘sky high’, as already seen in the graph above. Therefore the impact of the Slashdot effect is clearly visible in the response time of the web server. That said, this happened at exactly 12 dot 00PM. Now look, an explanation may be that at identical time, the Europeans take a lunch break and the east coast of the USA awakens. Now let me tell you something. We use the WP Super Cache plugin. We use WordPress as blogging software. Therefore, theoretically this cache module most possibly should handle this smoothly. We never had tested it under Slashdot effect conditions, where thousands of users simultaneous seek for to access identical webpage on the website. You should take this seriously. I had already done tests with it and it seems to improve performance significantly when reloading identical page multiple times.

 slashdot effect Amidst the first thing you read about improving the performance of WordPress is to use caching.

Whenever causing the site to buckle under the strain, when all those Slashdot readers start crashing the party, it can saturate a smaller website completely.

Now this can easily throw thousands of hits at the site in minutes. Often plenty of readers will hit the link to read the story, when Slashdot links a site. Now look, the site is said to be Slashdotted, when this happens. I’m sure that the Slashdot website serves around 3 million pages on weekdays, and slightly less on weekends.

 slashdot effect Basically the OliNo website is hosted in the Amazon Elastic Computer Cloud.

In our case we do not use the access log.

Another option we can use it so disable access logging. Error logging will still be enabled. Writing log information is a time consuming process. You see, this can take up valuable time it’s just a case of writing the information,, Apache keeps the log files open. Although, we can save few processor cycles by disabling it. We simply comment out the log lines in the configuration file, to do this. At 08 dot 35AM the server load was already increased to 27, a clear indication that the server is already overloaded. While using the Linux p command, is mostly about 3 during normal traffic, as long as the first group of visitors came to the website.

Normally this still young Renewable Energy website gets around 100 visitors per day.

Now this effect was clearly visible on the worldmap of google analytics. Within one hour, now this number climbed to more than 1000 visitors. Notice, at the moment of the post, Europe was just waking up, the US westcoast was just preparing to bed and the US east coast was still sleeping. Therefore this gives a clear indication that the web site needs plenty of tweaking to get a better performance. However, amongst the first things we did is to analyse the website with the very nice Firefox plugin YSlow. I know it’s also suggested to use minified version for the Javascript files. Remember, preferably you have to have only one Javascript and one CSS file. Seriously. Tip given there’s to combine as much Javascript files and Stylesheets into both single files.

Improvements suggestions are sorted on most impact on top.

The webpage has 14 external Javascript files, 6 external CSS StyleSheets and 24 CSS background images.

I am sure that the tip to minimize HTTP requests, is the first we must tackle. In the course of the day more visitors came from different parts of the world. So, in the evening we have received 27169 visitors from 134 countries/territories. This is the case.a lot of visitors came still from the USA. You can find more info about this stuff here. 1024 MB reserved for Apache / 20MB per Apache thread ~ 50 MaxClients.

Setting this value isn’t isn’t shown.
Then the tip of Apache is to divide the available quantity of memory for Apache by the quantity of memory used in Top by a single Apache thread. It seems we need to reduce the amount of MaxClients from 150 to 50 for our Apache configuration. Fact, our Apache thread uses between the ‘1620MB’ per thread. Among the first tips is to check the MaxClients option. Our Apache webserver isn’t tuned for performance. Basically, so it is a first step we can take. Remember, the current setting is Setting this value must result in error in the log. On p of this, look, there’s a great document about Apache Performance Tuning on the website of Apache. Yes, that’s right! We are clearly guessing now, as you can see.

One way to find the real bottleneck your personal performance tests on an identical non production set up.

The bottleneck can be CPU, IO or network.

Repeat this process until you are satisfied with the performance.

Lots of us know that there are a few options which can be tuned like the Apache webserver, the MySQL database or even the Linux kernel. During these tests the load on the server can be controlled and the server can be monitored closely. However, perform your load test, find the bottlenecks, try to solve them by adjusting the set up, do your performance tests again. With that said, this process is iterative. Anyways, the response time of the website is monitored by a global monitoring network service of Pingdom.

They have probe servers which are located in the USA, Canada, UK, Sweden and France.

With an interval of 5 minutes the response time of the website is measured from the different locations.

Notification is send when the server is unavailable. Looking at the details reveals that user processes is only taking 30percent CPU usage and the processor is still 16 dot 4 idle. You can find a lot more information about it here. The server load snapshot taken at 08 dot 35AM is a clear indicator the server is overloaded. CSS file and theme images are loaded on the CDN this will offload a bunch of HTTP request from the main web server, when the javascript file. You can find some more information about it here. Content is delivered with top-notch possible performance, requests for your objects are automatically routed to the nearest edge location.

Amazon CloudFront delivers your content using a global network of edge locations.

It should also result in a faster loading website for the visitor as the content to load is located more closely to the physical location of the visitor.

Now look, the second tip to use a Content Distribution Network is something Amazon can offer with CloudFront. Some digging on the internet shows that using Amazon Cloudfront will double the bandwidth costs for your website. Therefore this generates 914 KB x 2320 = 2 GB per hour of data traffic. Consequently, in the course of the peak we got 2320 visitors per hour. Now pay attention please. So this calculates back to 590 KB/s of continuous traffic. So this should not be the bottleneck. With 914 KB, the webpage is quite large. That said, this makes sense, as with Amazon EC2, you only pay for running instances per hour. However, gether with the announcement of Amazon for their loadbalancer solution they announced a feature called autoscaling. I’m sure that the loadbalancer will balance the load over the running web server instances. Autoscaling could ‘startup’ more instances to handle the increased load, when there’s a huge peak in visitors.

With that said, this could be very effective for surviving the slashdot effect.

Auto scaling will stop a lot of the running instances, when the load drops again as the visitors are gone.

Now this makes it possible to start / stop instances on the basis of the load of a number of instances using a voting mechanism. I thought I should leave my first comment. I don’t know what to say except that I have enjoyed reading. Sounds familiar? I recently came across your blog and been reading along. I’m sure you heard about this. Nice blog. Essentially, I will visit this blog very often.

So it is a cool article and I have posted a link to my twitter account.

I will also refer my customers to your AWS experience.

Surely it’s a freeware. Actually, you can check my very own ol CloudBerry Explorer that helps to manage S3 and CloudFront. A well-known fact that is. Our organisation will contribute to reach this goal. We found an appropriate name for our organisation, OliNo, that is a word joke for No Oil! It’s a combination of two Catalan words.Oli and No. Gether they mean Oil No! Let start a civilization which provides for its energy using renewable energy. Therefore, this effectively means we need at least 4 small EC2 instances.

Until the time comes when Amazon will offer a load balancing service in their EC2 environment, people are forced to use a software based load balancing solution.

Effectively quadrupling the current cost price of using a single EC2 instance.

Actually the next step will be running two small instances with the apache webserver with wordpress and a third instance with MySQL. To be able to handle a bigger load on the webserver one could start using multiple instances. I am sure that the web traffic gonna be load balanced over the two web servers. That said, this instance has 7 memory GB, 1 EC2 Compute Unit, 160 GB of instance storage, ’32bit’ platform. Fact, the OliNo website is using a small instance type.

One EC2 Compute Unit provides the equivalent CPU capacity of a ‘0 2’ GHz 2007 Opteron or 2007 Xeon processor. Instance is running in the ‘useast1b’ datacenter of Amazon. With that said, this translates back to around 39 visitors each minute. Eventually, the overall amount of visitors kept growing any hour. See also the results of a recent performance analysis and the current MySQL settings. Now pay attention please. The amount of visitors per hour went slowly down with a few hundred visitors less any hour until it stabilised at 11 dot 00PM / 05 dot 00PM, right after the peak. At 12 dot 00PM / 06 dot 00AM. At the peak 03 dot 25PM / 09 dot 25AM, the OliNo site received 2320 visitors per hour. Is it faster to keep them on the they are already in the browsers cache of the visitor, Google servers?

Leave a Comment

Facebook
Facebook
Twitter
Pinterest
Pinterest
LinkedIn