Want to measure server performance and speed up your server VN by more than 20%? Let’s find the answers in this article! [VinaHost.VN]

The BEST way to Measure and Optimize Server VN Performance

 

powerful-hardware-server
 

I. Essential server performance metrics you should be considering

1. Hardware utilization

First, let’s talk about overall hardware utilization. Any app or server running is limited by the resources allocated to it. Therefore, keeping track of the utilization of resources is the key, primarily to determine if a resource bottleneck exists. When considering these, you are looking for what can become a key resource for the whole system. This metric can tell you what physical component can be updated to improve server performance.

Hardware-utilization


You have these aspects to consider:

  • CPU (processor): CPU Utilization is the amount of CPU time used by the Web-App while processing a request. It is usually the percentage of CPU usage that is calculated, which indicates how much of the processor’s capacity is in use by your app. When the percentage of CPU usage begins at 100% that means there may be problem in your app or shortage of capacity deficiency of the server in Vietnam.
  • RAM (memory): Memory Utilization refers to the amount of memory used by a Web App while processing a request. It is usually calculated as the process’s percentage of memory utilization, which is a ratio of the Resident Set Size (real occupied memory size) to the physical memory.
  • The disk space and usage

2. HTTP Error Rates (HER)


HTTP-Error-Rates

Generally, some errors can occur when processing requests, especially when under a big load.

HER is measured as a percentage of problem requests relative to all requests, and it reflects how many response HTTP status codes indicate an error on the server VN – including any requests that never get a response. HER is a significant metric because it measures “performance failure” in the app and tells you how many failed requests have occurred at a particular point in time.

  • 200 or 3xx error codes indicate a redirect on the server.
  • 4xx & 5xx error codes mean the web server knows it has a problem fulfilling that request.

Normally, nobody can define the tolerance for Error Rate in their web app. Normally you should try to minimize possible errors (Error Rate of less than 1%) to avoid performance problems as well as work constantly to eliminate them.

>>> [TOP] 3 Things FOCUS before purchasing a Server Vietnam | VinaHost

3. The Count of threads


The-Count-of-threads

A web app can generate lots of threads to process requests. The number of threads is an important metric as the number of threads per process is normally limited by the system. The count of existing threads is proportional to the load and inversely proportional to the processing time of the requests.

So if your app generates too many threads, then it may be an indicator that there is a problem in the app.

4. Peak Response Times (PRT)
Peak-Response-Times

PRT measures the round trip of request/response cycles, however the peak will tell us what the longest cycle is at that point in the test.

In the case where the average calculation may be sub-second, you may still not be troubled and just consider that there is no problem yet. But, when the ART and PRT start becoming comparable, that indicates that you undoubtedly will have a problem in your server Vietnam.

Generally, Peak Response Times shows that at least one of the resources is potentially problematic. It can reflect an anomaly in the app, or it can be due to “expensive” database queries...

5. Average Response Times (ART)


Average-Response-times

By PRT (standard measurement unit of PRT is recommended to be milliseconds) measures the round trip of request/response cycles and the peak will tell us what the longest cycle is at that point in the test. It shows that at least one of the resources is potentially problematic.

If we are looking at a graph that is showing a 5 minute monitoring period and the PRT is 13 seconds that means one of our requests took that long. In the case where the average calculation may be sub-second, you may still not be troubled.

However, if the ART (Average Response Times) and PRT start becoming comparable, undoubtedly you have a problem in your Vietnam server.

Generally, it can reflect an anomaly in the app, or it can be due to “expensive” database queries.

>>> [TIPS] How to reduce Server Vietnam response time for WordPress

6. The Count of Open Files Descriptors (OFD)


Count-of-Open-Files-Descriptors

Files descriptors are an object that a process uses to read/write to an open file and to open network sockets. The number of file descriptors that a process may open will be placed on limits by an Operating System.

A shortage of available file descriptors can cause a wide variety of symptoms which are not traced back to easily. The OFD provides a count of the total number of file descriptors that are currently allocated and open for processing. The percentage of all open file descriptors with respect to the maximum allowed count of descriptors for processing is a good indicator for evaluating the performance of a web app.

7. Uptime

 

99%-uptime-1

Uptime is the amount of time that a server VN has stayed up and running properly.

It reflects the availability and reliability of the server, that means this rate should be as high as possible. Usually, a value less than 99% should lead to attention and less than 95% is to troubling.

8. Requests per Second (RPS)

 

Requests-per-Second

Requests-per-Second is the evaluation of how many requests/second are being sent to a target server. This indicator is called average load and it allows you to understand what load your web app currently works under.

This is measured as a count of the requests received during a measurement period, where the period is represented in seconds. The monitoring period is usually in the range of 1 – 5 minutes. The lengthening of the measurement period leads to an undesirable “smearing” of the load indicator.

>>> [TOP SERVER VIETNAM] - Way To Find BEST Provider | VinaHost.VN

II. How to optimize and speed up your server?

1. Fine tune your web server


web-server-1

As your site traffic patterns and site complexity changes, your web server settings need to be tweaked to maintain ideal resource usage.

It is best to have your web servers audited once a month if your site needs to constant updates.

Here are a few settings that need to audit and tweak if you use Linux Vietnam server and Apache:

  • Keep Alive: When you turn on “Keep Alive”, Apache uses a single connection to transfer all the files to load a page. This saves time in establishing a new connection for each file.
  • Timeout determines how long Apache will wait for a visitor to send a request. This has to be set based on the server traffic. In busy server Vietnam, you can set it up to 120 seconds. However, it is best to keep this value as low as possible to prevent resource wastage.
  • Keep Alive Timeout ensures that a Keep Alive connection is not abused. It indicates that how long Apache should wait for a new request before it resets the connection. 10 secs to be a good limit for heavily loaded servers.
  • Max Keep Alive Requests determines how many files can be transferred via a Keep Alive connection. Unless there is not enough resource constraint, this setting can be set as “unlimited”.
  • Hostname Lookups: Apache can try to find out the hostname of every IP that connects to it, but that would be a wastage of resources. To prevent that, you can set Hostname Lookups to “0”.
  • Min Spare Servers & Max Spare Servers: Apache keeps a few “workers” on stand-by to handle a sudden surge of requests. Min Spare Servers value of 10 and Max Spare Servers value of 15 to be a good limit for a heavily loaded server in Vietnam.
  • Max Clients tells Apache how many visitors can be served simultaneously. Setting Max Clients too high will cause resource wastage while setting it too low will result in lost visitors. So you should set it at an ideal value based on the visitor base.

2. Upgrade to SSD


SSD-1

The biggest drag on server VN performance is disk I/O. That is the time taken for the hard disk to spin to collect all the data your site needs.

SSD has functions like the server memory, so get an SSD disk for at least your database partition. It can cut down your load time by close to 10%.

3. Setup a fast reverse proxy


reverse-proxy

Your server Vietnam sends HTML files to a visitor’s browser. What if another visitor requests the same file?

Using a HTTP reverse proxy will be a solution. It sits between your server and the visitors. If a second customer asks for the same file, it’ll quickly serve the file from memory quickly.

Here are the top of popular web servers that can be configured as a reverse proxy.

  • Nginx is the favorite reverse proxy for the top heavy sites.  It has proven to be reliable against traffic spikes, and is a safe bet because of its stability and customizability.
  • Varnish is more complex than Nginx to deploy. However, sites with heavy traffic and a lot of content will be speed up see considerable gain in speed with Varnish.
  • Lighttpd – If you have a heavy site and resource usage spikes are common, Lighttpd can help the most. It is light and not likely to drag down the server.

Besides, there are many options such as Squid, Apache or IIS but these above are successful options.

4. Choose the right application server


application-server

Many app owners use apps that’s installed by default in their VN server (for example CentOS server uses PHP 5.4 instead of latest PHP 7.2 with Fast CGI Process Manager that has enormous speed advantages).

They may not know the differences and keep trying to optimize their site code to x speed issues. They can be able to improve app load speeds by more than 100% in some cases just by changing the app server, tweaking the settings to match the site load, and enabling cache.

>>> 
[2019] - How To Find Best Server Thailand Provider | VinaHost.VN

5. Turn on HTTP/2


http2-1

Actually there not many users are aware of HTTP/2 benefits.

Currently, all web servers use HTTP protocol v1.1 by default. But they all have support for HTTP v2 that is the latest version with many performance improvements. It improves server response time by:

Using a single connection instead of parallel connections to transfer files

Using compression to speed up header transfer

Pushing all files needed to render a page before it is requested by the browser

Using binary data instead of text data transfer

However, you need to configure the followings when setting up HTTP/2:

Switching the whole site to HTTPS (You will need to set redirects for site link.

Ensure that your reverse proxies are properly configured for HTTP/2.

Upgrade your webserver to a version that supports server PUSH.

Besides, HTTP/2 requires you to use SSL certificate that make your site more secure by default.

6. Fix your DNS query speed

 

DNS-1

Google wants your server VN to respond within 200 milliseconds.

And DNS queries are the biggest threat to that kind of loading speed.

There are not many site meet this requirement. This is especially true for traffic from outside their hosted country. As the distance between browser and DNS server increases, it will take more time for execution.

The only way to fix this is to use a distributed DNS cluster. You can get 3 low cost VPS in different area (Asia, America, Europe..), and then configure and optimize master-slave DNS servers in all of them.

>>> 
[TRENDS] 6 Server Vietnam Technology: From Physical To Virtual And Cloud

7. Defragment your database tables & optimize server settings


database-setting

All modern websites use databases to store site content, product data and more.

All activities like posting new comments, adding new pages, modifying or removing older pages and adding or removing listed products leave “holes” in the database tables. These "holes" are where a data was deleted, but was never filled back in. It is called “fragmentation” process and can cause longer data fetch times.

Database tables that have more than 5% of it’s size as “holes” should be fixed. Therefore, you should check your database tables for fragmentation each month and run an optimization query to keep your site from turning sluggish.

Every time you upgrade your web app or add a new plugin/module, the kind of queries executed on the database will change. And as the traffic to your website grows, the number of queries executed on the database increases.

If your database settings are not adjusted to accommodate the changes, your website will run into Memory or CPU bottlenecks.

So it is important to monitor database metrics such as slow queries, query latency, memory usage... and optimize database server settings to prevent issues. Some of the commonly modified database settings should be taken are:

  • query_cache_size – This is enabled for single web servers and is set to 10MB or below, depending on how slow the queries are at present.
  • innodb_buffer_pool_size – In MySQL databases enabled with InnoDB, query results are stored in a memory area called “buffer pool” for fast access. You can set this value anywhere between 50 - 70% of available RAM for MySQL.
  • max_connections – In multi-user servers, max_connections is used to prevent a single user hogging the entire server. In heavily servers, this limit can be as low as 10, and in dedicated server Vietnam, it can be as high as 250.
  • key_buffer_size – This setting determines the cache size for MyISAM tables. This’s set at 20% of available memory of MySQL.

8. Disable resource intensive services


intensive-services

Many server owners do not mess with the default settings in a server so that they would not disable services they never use. These services will consume memory and CPU.

You need to l find the services enabled in your server and disable them if you do not need.

Besides, some add services like backup and analytics also often runs during peak site traffic times. For resource heavy services such as backups, re-schedule it to night time when the site traffic is low.

9. Trim down your site’s critical rendering path

 

html

Your site’s index.html loads first with CSS, JS and images files in it. Those CSS files may have other links.

The lower the size and number of files needed to load your site, the better it takes. That is the concept of optimizing critical rendering path.

You can do it by:

  • Reducing the size of images
  • Deleting unused themes and plugins
  • Combining and minimizing JS and CSS files
  • Deferring files not needed on second scroll by “async”/ “defer” methods.
  • Compressing these files on disk

10. Enable caching

 

caching


Caching may be the single biggest speed boosting step while optimizing your dedicated server in Vietnam. Thanks to caching, the server does not have to spend time fetching files from the disk, executing the app code, fetching database values and assembling the result into an HTML page each time you refreshes a page. Therefore, it can cut the page load time by more than 50%.

These are locations in which you can enable cache:

  • Memory cache stores bits of data generated by apps in system memory, and when the same bit of data is requested, it is served without the need for processing.
  • OpCode cache is compiled results of previous page requests. Can save several seconds for complex apps like Magento or Drupal.
  • App cache: Some apps such as Magento and Drupal stores processed template files as pages to reduce processing time. This can be used in conjunction with any of the above caches.
  • HTTP caches are web server proxies that stores whole HTML pages. So if the same page is requested, it is immediately served. This is by far the fastest, and is ideal for high traffic smaller web apps.
>>> What server Vietnam evolution means for your business?

III. VinaHost dedicated server in Vietnam



If you run abusiness in Vietnam, a dedicated server Vietnam is the best choice to host your site with, in spite of the fact that it is quite expensive than shared hosting or VPS. It should be taken as a business investment, which will pay back after a certain period.

As with a dedicated server, you will not be sharing resources with any other user, your site would be more safe and stable. A dedicated server assures you that your business will never face an unwanted situation, such as server crash or slowed down with surge in traffic of another website as happens in a shared environment.

Server Vietnam also gives your retail business an enhanced security as you will be allowed to run your own custom firewall in order to enforce your own access control policy. Moreover, your Website will also be less prone to online security threat.

We use Dell, IBM, Supermicro server Vietnam with 2 CPUs (Intel Octa Core E5 Series) and up to 64GB of RAM or above as your demand. The powerful, reliable and durable servers allow you to flexibly expand hardware resources depending on your need and business development.


vinahost-1-1


Besides, at VinaHost we provide a wide range of server options including server rack Vietnam, Cabinets, Mounts and More... Thanks to our flexible monthly payment policy, you will own a high quality server service at an affordable price.

Some hosting services, in their extended services, offer maintenance and support on the servers. A managed VN server gives you a complete peace-of-mind since your server uptime monitoring, security patch updated, hardware warranty and such other jobs are handled quite efficiently by a team of experts at the web hosting vendor. If any problem arises, it is detected and handled easily by the technical support staffs.

Server is the best solution for enterprises that need to run large short-term projects. Vietnam server at VinaHost allows you to locate your server at Tier 3 Data Center that ensures a high transmission speed and 24/7 technical support.

In addition, we provide customer with free administration and full-service administration on demand.

vinahost


If you need to locate your dedicated server in Vietnam in USA or Singapore, please contact VinaHost directly via hotline 1900 6046, ticket or email support@vinahost.vn for help.

>>> Dedicated Server Vietnam Pricing