Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
1.6k views
in Q2A Core by
At the moment, my q2a is running quite slowly,

number of requests in my website varies from 55 to 60

db queries are about 221.

How to reduce it and will it make website faster?
Q2A version: latest
by
What do you use to see the number of requests and db queries?
by
define('QA_DEBUG_PERFORMANCE', true); using qa-config.php
by
for number of requests I use google browser console
by
Look at my q2a http://goo.gl/MAB3kV

2 Answers

+1 vote
by
Q2A does not have anywhere near 221 db queries per page under normal usage. I think you have a rogue plugin or two that is adding dozens of queries per page. Try removing one plugin at a time and see if the queries go down.

Same goes for the number of requests.
0 votes
by
I think the absolute performance of your server is insufficient. Line, CPU, such as a database, it can be considered a variety of causes.

Basis: Displaying one image saved in the database is very slow.

For example: http://www.qanday-qilib.uz/?qa=blob&qa_blobid=7489315226058813652

If your server is a dedicated server, there is a possibility of improving performance by tuning MySQL and PHP. However, if your server is a cheap shared server or VPS, it may be earlier that looked for other server.
by
It's shared server, not cheap though. CPU usage often reaches 100%. I've discussed it with provider, they advise to optimize website.
What can i do about it?
by
Probably, advice of provider will be wrong. I recommend you should test with simple HTML. Compare performance of <img> tag with development tool in your browser.

https://developer.chrome.com/devtools/docs/network

Test1: Display your site image
<html>
<head>
</head>
<body style="text-align:center;">
<h1>Hello!</h1>
<img src="http://www.qanday-qilib.uz/qa-theme/Snow/images/answer-icon.png"/>
</body>
</html>

Test2: Display this site image
<html>
<head>
</head>
<body style="text-align:center;">
<h1>Hello!</h1>
<img src="http://www.question2answer.org/qa/qa-theme/Snow/images/answer-icon.png"/>
</body>
</html>
by
Thank you for your valueble advice. I've searched the web for solution about reducing number of requests. I find that if images are called from subdomain eg: img.qanday-qilib.uz instead of qanday-qilib.uz, this will reduce requests to the website. Do you agree with that? If yes, how can implement it in q2a?
by
No. I am saying that the absolute performance of your server is a problem. Performance of your site is proportional to the performance of the hardware. It's not because of the software. If you reduced server load (request)  by transferring images to the other server, the performance of your site will not much improvement.
by
What do you think, 1 cpu/ 1 ram is enough to q2a with 1k users?
...