Refer the below links for improving the loading speed for common CMS,
https://help.hostingraja.in/how-tos/how-to-improve-the-website-speed-by-70-in-one-hour
We have written this article for customers who are having a concern that, Why Virtual Memory (RAM) usage is more when I don't run any application or I have not even started my website or I get only less traffic now, but RAM usage is more.
First of all, You need to understand the various technical things involved in memory, for example when it comes to memory in larger terms, RAM, Virtual memory, Paging, Cache memory and so many other things are involved.
If you are not willing to learn all these technical things, In simple terms the OS (operating system) will use the RAM(memory) as lavishly as possible like any rich kid and when RAM is less and not sufficient to run all the applications, It uses all the technique mentioned above to manage the show within the given RAM size. If not enough, it will kill the process, it's called (OOM) out of memory. If OOM occurs often then you must update/increase your RAM.
When any server is installed with any control panel, when not in use, these could be the usage scenario.
Used Memory is 122M, which is needed for your OS and other essential softwares.
The most important thing to note is the load average. When the load average goes beyond 2.x or 3.x, that's when you need to upgrade or increase your RAM and CPU.
Apart from the explanation given above, There could be 100 reasons why more RAM usage. Please read some of the following.
If you are interested to know more about RAM, Virtual Memory, refer the following links.
FileZilla is one of the most popular and free open-source applications which is used in transferring files from local PC and remote servers. FileZilla traditionally supports the File Transfer Protocol over the Transport Layer Security. This software of FileZilla is available on different platforms and it's absolutely free.
FTPS is less firewall-friendly when compared to SFTP as it requires opening a number of ports in the operation.
Loading time of your website is very important and we have written about it in great details in this URL https://www.hostingraja.in/solutions/loading-time-optimisation-service/, please check it.
In HostingRaja we recommend possible solutions to improve the loading time of our client's website.
Clients can migrate to VPS or Cloud or Dedicated server of HostingRaja as we use the optimized control panel to improve the loading time of our client's website or you can also contact our technical team they will help you in bringing down the loading time. If in case you are using VPS or Cloud or Dedicated solution from HostingRaja then we suggest upgrading the RAM, CPU, and bandwidth. Even after using higher configuration if your website is loading slow then you need to contact your web developer for further assistance.
Below are the possible reasons for a slow loading website:
Too Many Images in top banner and too many images on any page
Over-enthusiastic business owners or web developers keep too many images on the home page to impress the visitors. If you are having too many images on your website ensure that the images are very well optimized and it is less than 200kb. If you are using any top banner then be sure that you have only 3 or 4 images on the top banner having more than 3 images on the top banner will increase or loading time. We have seen in some scenarios where customers have more than 10 images in the top sliding banner.
If you are having too many images on your website try to reduce the number of images loaded or reduce the size of the icons and images. If you are using too many small images ensure that each image is less than 25 KB in size.
The reason why some websites are having too many CSS and JS files is that these websites are created using any open source or any template or themes available from the Internet. These themes and templates generally have more than 4 or 5 CSS in the home page, when you have more than 4 or 5 CSS or JS in your website or any particular page, you are loading time will certainly increase. In shared hosting, you find out how many CSS / JS files are in your website, if you have more than 5 CSS or JS files put together then obviously your loading time will increase contact your web developer and ask them to reduce the number of CSS JS within 5 to 6.
This problem is very common in WordPress and Joomla open source CMS. Website administrator browses through Add-ons and Plugins directories of any open source CMS when they see lots of plugins and Add-ons available for free they simply keep adding plugins to the website. When you had too many plugins to your website the loading will certainly increase.
When your website is loaded or any page is loaded each and every plugin installed on your WordPress or Joomla website will be invoked by the Apache. To put it in simple words for every plugin you have installed, the loading time of your website will increase by 2 seconds. So try to avoid installing unnecessary many plugins on your website.
Absence of a CDN:
A CDN or content circulation network is an appropriated organization of free workers situated in various geographic areas. They are utilized to serve web content to site guests with expanded accessibility, permeability, and execution. The second mark of this article clarifies why worker area matters for page load speed. A CDN distributes neighborhood workers to a site. This implies that it gives the site a US worker for its US guests and a Danish worker for Danish guests. This limits the full circle time (RTT) of the web content and loads website pages a lot quicker.
For some unknown reasons, customers or website owners or website administrator are obsessed to have too many images in the website, certainly having too many images in your website will not increase the revenue or the profit for your website. If having too many images will help to increase the review of any website then everybody will have hundreds of images. So it is a wrong notion to assume that having too many images will help your website.
Problem-related to a database which might lead to slow loading of websites for example if the developer doesn't use optimized MySQL query then it will increase the loading time of your website. So you can study on Google about how to optimize MySQL query that will give you enough information. For example, in my SQL server, there is a slow query option is there when you enable slow query option you can know what are the queries are taking more time to execute, find out those slow queries and then optimize it so that your website can go faster.
Whenever you are using select query you have to use select query always with the limit count for example If you want to select a record of matching certain name then you have to write a select query like select only the necessary field from the table where the name is equal to this name and limit is 1 when you use limit in your SQL Query execution will be faster.
Every apache server running in any server will always have a limitation on the number of connections it can accept, for example at any given point of time Apache will serve 250 or 500 or 1024 connections at a given point of time. So if your website is under DDOS attack or denial of service attack or slows attack then all the HTTP connections of your Web server will be utilised by the attacking parties so your website server will not have the option to serve your customer this will give you impression that your website is loading slow you can find out whether your website is under attack or not by using netstat command available in Linux
Bandwidth limitation applied by hosting provider
Just check with your website provider or hosting provider whether any bandwidth limitation is applied for your hosting or not. If they have applied any limitation on your bandwidth talk to them and upgrade your hosting plan as necessary.
Nowadays due to the complex requirement of websites, web developers use very lengthy CSS and JS documents. About 5 to 10 years before the CSS and JS files used to be less than 1 kb in size and nowadays complex JavaScript frameworks such as JQuery, Node JS, and Angular JS, these JavaScript frameworks are huge in size. If the JS file size is more than 2 KB then loading of this JS and CSS files will take more time by the browser, generally, CSS and JS files are added in the header section of the Unique HTML. A browser will try to load all the files mentioned in the header section and this adds a delay in rendering the browser content.
Use plugins available for Cache purpose most of the modern content management systems like Wordpress and Joomla comes with a bundle of cache plugin make use of them to give better performance
Go with Virtual Machine from HostingRaja or Cloud HostingRaja from HostingRaja
Go with powerful servers such as HostingRaja cloud or HostingRaja VPS, if you are in shared server then there are certain limitations are applied such as RAM and CPU usage by upgrading to VPS and cloud VM you will have access to more resources to load your outside faster.
Myself being a programmer for the last 15 years I have seen most of the website Optimisation problem is due to poor coding practice.
Remove the dead source code which is not required in your website it can help you to speed up your website
Use, less content on your website mainly within the header section of the HTML page, having more content in header section will lead to slow loading of your website
Avoid too many backlinks to an external website, having too many external links to a website like Facebook, Twitter or external feeds or RSS in your website will slow down your website loading time
If the average loading time of your website is higher than 5 to 10, you'll have slow loading websites. In Linux using the top command, you can find out what is the average load of your website. If the average load of your website is more than 20 or 10 then you have to either upgrade the resources required for your website or have a Load Balancer or have multiple instances to serve your request.
HOW TO FIND OUT THE SERVER LOAD IS HIGH IN YOUR VPS SERVER OR DEDICATED SERVER?
Website is loading slow
login to SSH of your linux server, press ‘w’ to know the current average load and top -cd2 to know which process is taking the load.
WHAT IS SERVER LOAD?
Load that expresses how many number of jobs or active processes are waiting in the queue to access the computer processor. This is calculated for a certain period of time over the last 1, 5, and 15 minutes.
This server load is indication on how much work has been done on your serve.
We consider a load value under 5 to be acceptable.However if the server average load reach 5.00 or greater for a consistent period of time, then it's worth finding out the exact cause of the higher server load to resolve the issue or prevent from server down.
HOW SERVER LOAD IS LINKED TO THE PERFORMANCE OF YOUR VPS
Not reducing large image file sizes
Not using Gzip compression
Not using Browser Caching
Using larger numbers of plugins.
Users/spammers sending spam email.
Users sending large mailing lists.
Server backup file are consuming server space.
Running out of memory and swapping to the swap file.
Error take place due to software misconfiguration.
To many high resource website running in single server - This cumulative resources resulting in high server load.
HOW TO SOLVE THE PROBLEM
Optimize images
Enable Gzip compression
Minimize the number of plugins
Enable browser caching
Choose a reliable web hosting plan
Remove the unwanted files and plugins.
Download the backup files to local system
Provide highly secure passwords for mail account to avoid the spammers attack.
Use the load balance server for high resource website..
Check the database tables are closed properly or not.
SYMPTOMS FOR THE LOAD RELATED ISSUE
Files, databases will not be able to upload or download from the server .
Site will not load or very slow website loading.
Continuously server down will take place due to out of memory .When you restart the server it will work temporary after sometime again server will go down.
STEPS TO CHECK THE SERVER LOAD ISSUE IN SSH:
STEP 1: To check the server load.
Command: w
Average load for the server is : 5
If Average load is with in 6 check with mentioned below gtmetrix site speed checking tool.
KEEP-ALIVE should be enable for apache server.
To enable KEEP-ALIVE => login to WHM => Search Apache Setting module => Enable KEEP-ALIVE After 5 minute check with gtmetrix KEEP-ALIVE is enabled or not.
Inform the client check browser caching And Optimize images ,Minify JavaScript,CSS,HTML.
But this is very basic case you should check the mentioned below cases also.
OUT OF MEMORY:
STEP 2: To check the disk space
Command :free -h
This is command to check what space is allocated and how much client have used, and free space.
STEP 3: Refer the message log file.
Command: vim /var/log/messages
Search ? Out of memory
Check the date and time , if issue is related to out of memory inform the client to upgrade the plan.(If client is maintaining any backup files in server inform the client to download the backup to local system and delete from server)
MYSQL QUERY :
STEP 2: Check which process taking high load.
Command : top -cd2
Analyse for few minutes which process is taking high load, Most of the time mysql will take high load.
STEP 3: To check which mysql database taking more load.
Command : mysqladmin proc
STEP 4:
Case 1: If sentora_postfix database taking high , Check the mailq in SHH
Command : mailq
If continuously mails sending in mailq it may be due to client sending lot of emails or spam mails or someone might have hacked the client mails.
Case 2: If client database is taking high load.
It will happen due improper table close in client database(Inform the client to check table connection is closed or not) or due to lot hits in databases.
Example: e commerce site will take lot of mysql lot , Because it will have lot of plugins and products. (Inform the client to move load balance server.
Check 3306 port enable in csf or not , If client not using external database connection remove this port from csf
Command: lsof -i:3306 => to check port is enabled in server or not.
SERVER SLOW DUE TO HITS:
STEP 2: Use the mentioned below command to know server hits.
Command: tail -f /etc/httpd/logs/access_log
Command: tail -f /etc/httpd/logs/ssl_access_log
STEP 3: To check the mentioned below file to know Which countries are trying to access the server.
vim /etc/csf/csf.deny
STEP 4: If you found a lot of hits from other countries apart from his own country, Inform about the hits to clients and ask him what are the countries he has given the access for his website.
Example: If client doesn't wants to access his site from China and United States , just give the country code in CC_DENY in csf.
Refer this link to Deny counrty code in CSF: https://www.liquidweb.com/kb/how-to-block-traffic-by-country-in-the-csf-firewall/
To know the country code : https://serverhealers.com/blog/csf-country-code-full-list/
BEFORE EDITING ANYTHING YOU SHOULD INFORM THE SENIOR
Page 1 of 3