Hosting & Domaining Forum

Hosting Discussion => Hosting Software and Control Panels => Topic started by: soxcell on Nov 19, 2022, 02:39 AM

Title: Issue of webhosting load
Post by: soxcell on Nov 19, 2022, 02:39 AM
Greetings to everyone. Although I may not usually contribute here, I thought I'd give it a shot anyway. My profession is content management and I specialize in website filling. Currently, I am responsible for filling out one particular site that no one else is working on.

However, lately the hosting provider has been reaching out to the customer and complaining about the server load caused by the website. The provider even sent a letter to the customer, which I have included below.

"Hello!

You are a SpaceWeb customer.
Your login: ***
Contract number: ***
Over the past day, the load created by the MySQL databases of your account amounted to 2764 processor seconds. This exceeds the permissible load of 1000 processor seconds on virtual hosting tariffs and is a violation of clause 2.11 of the Rules for the Provision of Services specified in Appendix 1 to the Public Offer Agreement.

In accordance with clause 2.3. of the Agreement, the work of the account may be suspended: "2.3. The Contractor has the right to suspend the provision of services in cases of violation by the Customer of clauses 2.10-2.12. of Appendix 1 to this Agreement until the reason for the suspension of the provision of services is eliminated."
In order to avoid the shutdown of your account, please reduce the load created as soon as possible.
To reduce the load, we recommend:
to carry out technical work on optimizing SQL queries in site scripts.
use indexes in databases

The customer claims that I am causing this excessive load by adding numerous products, ranging from 150 to 200 per day. Each product description includes a picture of around 100-200 kb. Unfortunately, I don't completely comprehend how my filling could impact the hosting load.

Therefore, I would appreciate any advice or solutions on how to tackle this issue. If the customer is correct and I am the cause of the hosting load, please let me know how I can reduce it. Thank you.
Title: Re: Issue of hosting load
Post by: kevin66 on Nov 19, 2022, 02:54 AM
The individual responsible for creating the website is a novice who has produced suboptimal results.

The hosting provider is unhappy with the central processing unit (CPU) load of the database management system (DBMS), which is due to the excessive amount of database queries that occur during the filling process. Additionally, if there are numerous intricate read requests, the situation could become even worse.

One possible solution to this issue is to convince the customer that by attempting to save a meager amount of money each month on subpar hosting, they are sacrificing the quality and performance of their website. Since the download speed of the product catalog is directly linked to the database response time, it would be in their best interests to switch to a more suitable web hosting service.
Title: Re: Issue of hosting load
Post by: markstylor on Jan 13, 2023, 05:34 AM
When a webpage's rendering speed slows down, what can be done?

One solution could be to configure a deferred loading process for JavaScript. This means that the largest JS files will not impede the display of other content by being loaded last. To implement this delayed upload, it is advisable to call an external JS file before the </body> tag.

Another option is to use asynchronous script loading. When synchronously loading scripts, the page may take longer to load in the browser since the browser will wait until all CSS and JS files have been processed before displaying the page. Asynchronous loading allows the browser to load an HTML page even if not all js and css files have been processed.

It is also useful to place CSS file links before JavaScript file links. This enables gradual loading of the page, including the title, logo, headings, top blocks, and so on. If CSS files are placed after script file links, the browser may slow down as it attempts to load all elements simultaneously after a delay.

To reduce file size and increase browser load time, it's recommended to remove any unused code elements, such as empty lines, line breaks, unnecessary comments, extra spaces, and tab characters.

Finally, having two versions of files -- a development version (with comments and proper formatting) and a minified version (for posting on the website) -- can also help optimize page rendering speed.
Title: Re: Issue of webhosting load
Post by: flyeaglesfly on Sep 04, 2023, 02:37 AM
To address this issue and avoid the potential suspension of your account, here are a few suggestions:

1. Optimize SQL queries: One of the recommended steps is to carry out technical work on optimizing SQL queries in the site scripts. This can involve reviewing and improving the efficiency of the database queries used on the website.

2. Use indexes in databases: Indexes can help improve the performance of database queries by speeding up data retrieval. Make sure that relevant indexes are created for the tables used by your website.

3. Evaluate image sizes: The customer claims that the large number of products you are adding, along with their accompanying images, may be contributing to the high server load. Consider optimizing the size and format of the product images while ensuring they still meet the required quality standards.

4. Assess caching mechanisms: Implementing caching mechanisms can help reduce the strain on the server by storing frequently accessed data and serving it quickly without the need for repetitive database queries or resource-intensive operations.

5. Consult with technical experts: If you are unsure about how your filling process is impacting the server load, consider reaching out to technical experts or the hosting provider's support team for guidance. They can provide insights specific to your website and offer further recommendations tailored to your situation.

6. Implement lazy loading: Lazy loading is a technique that delays the loading of non-critical resources, such as images or scripts, until they are needed. This can help reduce the initial load time and overall server load by loading only the visible content initially.

7. Minify CSS and JavaScript files: Minifying CSS and JavaScript files involves removing unnecessary characters, spaces, and comments, reducing their file size. This optimization technique can improve website performance and reduce server load.

8. Enable browser caching: Utilize HTTP headers to enable browser caching, which allows the user's web browser to store certain files locally. This means that subsequent visits to the website won't require re-downloading those files, thereby reducing server load.

9. Consider content delivery networks (CDNs): CDNs can distribute your website's static files (such as images and scripts) across multiple servers worldwide. By serving content from servers geographically closer to the users, CDNs can reduce the strain on your hosting server and improve overall page load times.

10. Monitor and analyze website traffic: It may be beneficial to track and analyze your website's traffic patterns using tools like Google Analytics. This can help identify any specific pages, features, or actions that contribute significantly to the high server load, allowing you to optimize those areas accordingly.

11. Enable caching on the server-side: Implement server-side caching techniques such as opcode caching or object caching. These methods can significantly reduce the load on your server by storing compiled code or frequently accessed data in memory, eliminating the need for repeated processing or database queries.

12. Consider using a content delivery network (CDN): CDNs not only distribute static content but can also help offload dynamic content by offering caching and load balancing services. By serving content from servers closer to the users, CDNs can improve response times and reduce the load on your primary server.

13. Assess the hosting environment: Evaluate if your current hosting environment is adequate for handling the expected traffic and server load. If necessary, consider upgrading the hosting plan or migrating to a more robust hosting solution that can better handle the demands of your website.

14. Check for resource-intensive processes: Review your website's code and plugins/extensions for any inefficient or resource-intensive processes. Identify any bottlenecks or areas where you could optimize code execution or reduce resource consumption to alleviate the server load.

15. Utilize a dedicated database server: If your website heavily relies on database operations, consider setting up a separate database server dedicated to handling database queries. This can help distribute the load and improve overall performance.

16. Monitor and optimize database performance: Regularly monitor your database performance through tools like MySQL's slow query log or performance monitoring utilities. Identify and optimize slow-running queries, add indexes if needed, and ensure efficient database schema design.

17. Consider horizontal scaling: If the server load continues to increase despite optimizations, explore options for scaling horizontally by adding more servers to distribute the load. Load balancing techniques can help evenly distribute traffic across multiple servers.