X-cart 4.1.9 suddenly super slow on all functions

X-cart 4.1.9 suddenly super slow on all functions. I tried to do all I can and know to do, clear all stats (OK), use Tools menu to Optimize tables, to Check Database integrity (Result: success, but 100 consistency errors have been found, with non-existing product ids), Force Cache Generation (Result: Content Encoding Error), Clear Templates Cache (OK) etc.

I also used tools.pingdom.com and the home page of the X-cart loads in 32 seconds.

The unnecessary (unused) modules were already disabled a long time ago. Disabled maximum modules. Still the same horrible slowness as never before. In both admin and customer sides of the X-cart. No one would wait this long.

The slow down started happening between 2 to 7 days ago instead 2-3 sec. ewaiting for every step now it takes 7 to 15, sometimes 20 seconds to turn any page, any functionality.

Even when I close the shop for maintenance, the page that appears there when the shop is closed is loading slowly, in 7 to 15 seconds.

4.7.8 cart separately hosted on the same servers is NOT that slow.

For the past 7 days search queries are some kind of injection code and someone with a weird id anonymous such as GRLpGpAG_GRLpGpAG (using: sample@email.tst) ordering large quantity or amount, but not sure if this is the reason. Once I close the shop the "USERS ONLINE" number slowly comes down to zero, but once reopened the USERS ONLINE number comes to over a thousand or more, with sinister ids being registered multiple times and anonymous logins. Could the be the reason of the slow down? In the past these kind of things did not cause slow downs.

What could the problem be? Is this so easy to attack an online shop and to slow it to a halt for days etc?

(below is the one of the issues under the Tools)

Tools >>> Check database integrity

This tool allows you to improve the consistency and quality of data structures in your MySQL database. more...

Also, my 4.7.8 has an equivalent "GB" size of approximately 7 units and holds about 45% of goods of the 4.1.9 while 4.1.9 has size of over 200 "GB" and holds about 2x amount of goods than the 4.7.8. So 30 times larger MB size and only 2 times amount of listed for sale goods. What could be the issue here?

My host (LiquidWeb) writes: Looking over the server configuration noticing a couple of things that can be improved right away.
- Server is running CloudLinux, but is not using LSAPI.
- Server is running an older version of MariaDB.
- A significant portion of MySQL data is still on MyISAM
- One Site is on PHP 5.3
- Server has high Swap usage
- Swap is primarily from Clamd and MySQL. Updates to MariaDB 10.2 and InnoDB should help with this.
I have reviewed your server configuration and I have several suggestions in order to get your server running better. It seems that most of the issue is with unoptimal settings causing the server to start using swap. I am recommending the following.

1) Update MySQL. Currently the server is running an older version of MySQL and upgrading to MariaDB 10.2 will provide both better security and performance. MariaDB 10.2 introduces thread-pooling which allows the server to better handle simultaneous queries to the database. During this upgrade the tables using the out of date storage engine MyISAM will be updated to the more modern and efficient InnoDB. InnoDB unlike MyISAM does not require row locking which can severely bottleneck queries. It can also leverage buffer_pools and keep commonly accessed information in memory which is significantly faster than reading information from the disk.

2) Your server is currently running CloudLinux but it is not using LSAPI as it's PHP handler. LSAPI is much more efficient and easier to configure than PHP-FPM or SuPHP. I recommend that we upgrade the PHP handlers on your server to LSAPI which will help with the server load and php execution.

My note: I hope all of the above will resolve the 15+ second load issue and hopefully this is not something broke or infected in the 4.1.9 X-cart itself.

I welcome opinions, suggestions and help. Also welcome price quotes to absolutely resolve this issue if you think it is beyond hosting.

Thank you for the link to the tool, yet I have no idea how to use it correctly.

Also my host (LiquidWeb) magically made all those upgrades mentioned above in the bottom of my OP and magically my both X-carts including the 4.1.9 that previously loaded in 15-20 sec. now loads lightningly fast. So I guess and suppose it was a hosting/server (or whatever it was) issue, but I would STILL like to use the tool you provided, but can't because of limitation of my knowledge. Can you please advise further how to correctly use the tool or can you check it for myself out of your curiosity and let me know the results? Thanks.

Thank you for the link to the tool, yet I have no idea how to use it correctly.

Also my host (LiquidWeb) magically made all those upgrades mentioned above in the bottom of my OP and magically my both X-carts including the 4.1.9 that previously loaded in 15-20 sec. now loads lightningly fast. So I guess and suppose it was a hosting/server (or whatever it was) issue, but I would STILL like to use the tool you provided, but can't because of limitation of my knowledge. Can you please advise further how to correctly use the tool or can you check it for myself out of your curiosity and let me know the results? Thanks.

roger

I am glad to hear the speed issue has been resolved

As for the benchmarking tool X-Cart provides, the article I referred to explains it pretty well. I learned it myself using that article.