New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Comments
Redis
No
When it is using a lot of resources is someone doing a query?
Run show processlist when it is doing it.
thanks can you let me know all ssh commands to do so?
Have you optimised the MySQL server? If the cpu is not powerful enough you do have option to offload MySQL by creating node specific for MySQL usage.
It is a 4 CPU , No I do not know how to optimize the mysql on my cpanel I have only one account in my vps
Use nvme ssd + litespeed Web server and cloudflare cdn.
Also upgrade to high vps or move to dedicated server.
size of database? How often are queries done? Please also list CPU, storage type and RAM size of the server
Enable the slow query log, see what queries are taking too much time to respond.
tuning-primer.sh / mysqltuner.pl , with patience and a little bit of research.
(I ignore the query cache suggestions to turn it off: personal experience/preference.)
optimise your database or download more ram
Where can I download ram?
Here
Every question you ask here eventually becomes a joke
Do I get a bonus, for giving a correct response?
You are chinese ? LOL your icon is a dragon !
Nope. Dragon 32 (Google it) which I still have in the attic!
Chinese allergy, but don't know Chinese
LOL
You could try adjusting the innodb_buffer_pool_size
You could use PHP and use curl to do your mysql queries as a rest API instead of creating direct connections to the mysql db. Much more efficient. Try here: https://developer.okta.com/blog/2019/03/08/simple-rest-api-php
Also, don't do unecessary queries unless you have to. Cache the data.
reboot
@lowfan this may help https://www.monitis.com/blog/101-tips-to-mysql-tuning-and-optimization/
Honestly your question is kind of a joke. "From time to time mysql uses a lot of mysql and cpu. What can I do?" No details about the workload, version of MySQL or even if it is MySQL vs. Maria, what kind of server, what apps, etc.
Then this:
If you continue looking for magic recipes on the Internet that you can type with no understanding of what they do, you will make a soup of your system.
You're in way over your head. Hire a sysadmin. That is the only logical answer for you.
Yes I know it is over my head . How much do I normally need to pay for just this kind of one time work?
Thanks
Good sysadmins ask for around + 50$/hour. Below that you will get a mediocre job, unless it is someone reputable.
It has happened to me that some clients make a soup of their system, they have completely f*d up databases. Just by changing simple settings, they completely corrupt everything!
If you are going to do it yourself, just do backups all the time of your system. Or If you want to avoid paying a sysadmin just grow your vps, more and more.
Just avoid messing with the innodb_log_file_size > @lowfan said:
What is the specifications of the server most specifically ram amount
@lowfan It is really important that you give us more details on what you are running that uses mysql, perhaps an idea on the hardware specs and the visitors per hour for example so we can guess closer to an answer. As for fixing your issues, you shoild also take the opportunity to learn (easier said than done) but try to break things up logically. For example, in your issue, its not really mysql's fault per say (putting aside the argument of mysql default configuration). It is probably an honest overload of traffic that could be causing this so start with how to check whether your website (assumedly) is doing queries properly and fix if necessary. If that doesn't help, consider additional caching. If that doesn't help, considering double checking mysql table indexing. If that doesntt help, consider mysql config tweaking. If that doesnt help, chexk on system cpu and io usage. If those are maxing out, probably just a case of one server not being able to handle all the visitors in which case, you will have to split things up and that would be the start of spending more money on professional help.
Clearly, the solution to the problem is getting a 10x faster machine, therefore decreasing the percentage of CPU used and no visible problem anymore.