is there any way to find out which users are most intensively using mysql? i've installed mytop which gives me some info, but the only user it shows connected is me (i.e. localhost) with no break down of what tables are being used etc.
also in whm i can see mysql has consuming quite a bit of memory/cpu, but it doesn't show me individual users; just the service as a whole.
I'm having a problem with high MySQL CPU usage on my server, one of my sites is getting hit pretty hard right now and MySQL is just killing the box. Its averaging a load of over 20, CPU usage is around 130%.
here is my my.cnf file. is there anything in their that should be changed to help lower the CPU usage?
# The MySQL server [mysqld] port= 3306 socket= /var/lib/mysql/mysql.sock skip-locking key_buffer = 256M max_allowed_packet = 1M table_cache = 512 max_connections=500 sort_buffer_size = 2M read_buffer_size = 2M read_rnd_buffer_size = 8M myisam_sort_buffer_size = 64M thread_cache_size = 8 query_cache_size = 32M # Try number of CPU's*2 for thread_concurrency thread_concurrency = 2
[mysqldump] quick max_allowed_packet = 16M
[mysql] no-auto-rehash # Remove the next comment character if you are not familiar with SQL #safe-updates
My mysql is using alot of memory although there is not much data into the mysql tables. I tried to control mysql usage by editing my.cnf file but that didnt help.
Which variables should I edit in my.cnf to keep mysql using low memory?
I edited sort_buffer_size, key_buffer_size but that didnt help much. It uses alot of per-thread memory as well.
I need some help my CPU (Intel Core 2 Duo 1.7 Ghz) always gets high usage from mysql sometimes its using 95% cpu etc... How can I modify my.cnf to use less CPU and more ram since I have 3gb ram installed?
is there is any way or command to know every account on the server how much it using for mysql space? i know i can know it from cpanel page but it's for one account is there a way to make a list for the usage?
and also i want if there is any wait to limit the database size?
cuz i want make a limitation for my clients every account cannot put any databases more thatn 100MB size?
I am very low of system resources but wish to use MYSQL as my database backend so I have installed MYSQL 4.0 on my Debian Sarge 3.1 VPS with linuxthreads and configured it to use least possible resources as my VPS only offers 32MB main memory. Generally I use the PS command to get the memory usage of running processes. But MYSQL being threaded confuses me. My system uses linuxthreads so all the threads get listed as seperate processes but show same stats in PS command output. On initialization, MYSQL starts 3 threads which according to documentation, are necessary for its functioning. This is what I see:
root 139 0.0 0.0 2436 4 ? S Feb07 mysqld_safe mysql 163 0.0 4.5 5480 1264 ? S Feb07 0:02 mysqld mysql 164 0.0 4.5 5480 1264 ? S Feb07 0:00 mysqld mysql 165 0.0 4.5 5480 1264 ? S Feb07 0:00 mysqld
Is that means MYSQL is using only 1264 Kb of real memory? If that is the case, I am really happy about my tweaking skills. After doing a query through PHP, the output becomes:
root 139 0.0 0.0 2436 4 ? S Feb07 mysqld_safe mysql 163 0.0 4.5 5510 1278 ? S Feb07 0:02 mysqld mysql 164 0.0 4.5 5510 1278 ? S Feb07 0:00 mysqld mysql 165 0.0 4.5 5510 1278 ? S Feb07 0:00 mysqld
Thats just very nominal resource usage. I am assuming that what PS is showing are just duplicate entries for a single MYSQLD process and 1278 Kb can be safely taken as its RAM usage. I hope it is not (1278 X No. of mysqld threads).
I had a 280 MB MySQL db on a 384 MB Linux Dual Xeon 3.2 GHz VPS (no CP, no additional software) and it was no where near enough. Even if I upgraded the VPS to say 1 GB of Memory, it would take no time at all to over load it at this rate. There must be something wrong with the setup, I can't see MySQL being so resource heavy... or is it?
I'm checking my CPU/Memory/MySQL Usage and I'm seeing that something called Munin is running at 54%. That is apparently the average for today. Can anyone give me any insight as to what this is?
Wikipedia classifies Munin as a network monitoring application. I don't think it should be using this much processing.
It appears that I may have enabled this plugin when I rebuilt my apache using EasyApache. Are there any big benefits to this? Looking at the graphics at first glance it doesn't look like there is. but then again, I'm not that knowledgable about this stuff.
I'm no SQL expert so I'm not exactly sure what to look for in-depth here. However, I noticed that MySQL would periodically raise to 98% cpu usage in top. So, I checked it out and turns out every time you load the front page of a site I host it takes about 30 seconds to load and its during that time that MySQL is freaking out.
I know the user relies heavily on MySQL, however I want to try to narrow down the problem as much as possible for them. Any recommendations on what else to look for?
just noticed mysql cpu usage has shot up from its usual 5-10% cpu to 30%+. domains are as normal and no extraordinary php processes.
any way i can tell what users are most heavily running mysql? (as in number queries / slow queries etc?) i know mysqladmin processlist but that only gives me a snapshot, whereas i want to see over 24 hours, who used mysql the most...
my server is jammed and takes minutes to load simple pages, can you please take a look ath the following image, its show under "CPU %" for mysql 177, does that mean mysql is using 177% of resources of cpu?
One of my friends uses a popular shared hosting provider, and I was assisting him with a web site issue earlier.
I noticed the following warning in the host's control panel:
"[MySQL databases] may not be used for log evaluation operations, ad clicks, chat systems, banner rotations, or similar applications putting extreme loads on the database under any circumstances."
I have 2 identical Fedora8 boxes with Apache 2.2.8, MySQL 5.0.45 and PhP 5.2.4. I use one as the Web+DB server (say box A), and the other (box B) just as the Web server connecting to the DB server on box A. I use this 2 machine configuration to test a LAMP based-Web application. I have a client program on other machines that can emulate a massive web workload to these 2 servers; it can emulate hundreds to thousands of users using the application simultaneously.
Before running the test, the connection to the DB server from both boxes seem fine. Using the mysql client program on either box A or B trying to connect to the DB, the connection goes through instantly. In the /etc/my.cnf file, I have max_connections=4096 and max_user_connections=4096. Note that the web app uses one single db user to connect to the db. To allow remote connection, I inserted one record into the user table of the mysql db whose the host field's value is '%' (allow connection from all remote hosts).
After running the test (which I found out that many requests sent to box B failed), mysql client program on box A is still able to connect to the db instantly; but the one on box B has a problem: it takes extremely long (5 - 10 minutes or even more) to establish the connection, it doesn't time out, just takes that long. I believe that's the cause for the failure of requests to box B.
I have a site that is eating up my server resources and need to know what the best solution for this is. I'm thinking of getting another server just for mysql but do not know what specs the server should be to handle the current traffic/database load and have the site run smoothly without slowing down to a snail's pace.
An alternative is to get another server just for the videos being served and leave the database and html on the current server. This is where I'm stuck and don't know what route to take with this.
I've attached screenshots of top and bandwidth usage per day. Hopefully with this information you could tell me if I need another server or if there are any things I can do to the current server to help things move faster.
I installed the MySQL binary packages in /usr/local/mysql/ after removing the MySQL RPM package. MySQL is functioning when I executed /usr/local/mysql/bin/safe_mysqld. I reinstalled MySQL before I installed PHP. When I used a PHP script to access a MySQL database, it outputs an error:
Code: Warning: mysqli::mysqli() [function.mysqli-mysqli]: (HY000/2002): can't connect to local mysql server through socket /var/lib/mysql/mysql.sock in index.php on line 2 However, I installed MySQL in /usr/local/mysql, not in /var/lib/mysql. How do I fix MySQL?
For some reason mysql wont start, i have tried restarting mysql but it wont, it says FAILED. The mysql.sock file seems to have disappeared and i cannot find it anywhere.
I recently had a harddrive failure and luckliy I can still access certain directories on this failed drive. I can still access the /var/lib/mysql/ directory which holds all the users databases and have backed all these up separately using tar.
Now what I need to know is how do you restore these database files to another server? I tried simply untar'ing one of these to the new servers /var/lib/mysql/ direcotry and it stuffed Mysql up - it went offline. I had to get a cpanel tech to bring Mysql back online.
how can I get these database files to fully work on a new server?
I've been racking my brains with this problem for the last couple of months and have made zero progress. I've asked a lot of people if they know what might be wrong here, but none of them have any idea.
Basically, the problem is that any sort of service monitor I put on my server shows MySQL as being down/offline, even when I know for sure it's up and running perfectly fine. All other services report a green light.
The mysqld service is running on port 3306, which is open both inbound and outbound on my APF config, so as far as I can tell it's nothing to do with the firewall (I won't rule that out though).
The other odd thing is that MySQL shows a green light within WHM, but not anywhere else.
Does anyone know what might be wrong here? Am I missing something entirely fundamental and obvious?
I have been using Blue Host for years, but recently they kept suspending my account due to performance problem.
I was only running a php forum (phpBB3) and a Wordpress blog. They kept mentioning it is not problem with space/bandwidth, but issues with "Running application causing high load", and the mysql queries from phpBB3 are taking too long.
Now I am planning to add a Ruby on Rails application. I am sure it will cost more CPU usage. What should I do? Will a move to VPS hosting solve my problem?
We are currently looking to move to a new dedicated server provider located in the United Kingdom. The server is solely used to provide an IRC daemon to a large IRC network that receives multiple gigabits of DDoS and PPS. We are currently with another hosting provider who can no longer support us.
Our current specification is DualCore Xeon 2.67Ghz/4MB Cache with 500GB SATA HDD. A good connection and available bandwidth (preferably 3-5,000 GB bandwidth /month) included in the price. We are seeking to move to a new dedicated server host, if you know a company that can accommodate our needs,