Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
UBBDev.com
UBBWiki.com
Who's Online
2 registered (driv, Outdoorking), 40 Guests and 14 Spiders online.
Key: Admin, Global Mod, Mod
Featured Member
Registered: 11/22/06
Posts: 163
Top Posters (30 Days)
Ruben 51
DennyP 24
Gizmo 24
Dunny 15
SteveS 14
AllenAyres 12
dbremer 10
SD 10
drkknght00 9
doug 8
Latest Photos
OK Corral Shoot Out
Testing
Basildon Train Station
Basildon Town Centre looking from the rounderbout
Basildon Town Square
Page 1 of 4 1 2 3 4 >
Topic Options
#206303 - 02/12/08 10:08 AM General MySQL question
Basil Offline
addict
Registered: 08/18/06
Posts: 685
Loc: Southwest US
Every so often, but Threads Install bogs down. I have my own server (leased) and sometimes, the pages start loading very slowly. When I log in as root and do "Top" command it appears that MySQL is using lots of memory and cause most of the load. If I reboot the server it usually clears this up. I'm just wondering if anyone has had similar problems and if you know what might be changed in MySQL config to make things more robust?

Basil
Top
Express Hosting
Express Hosting "We are the official hosting company of UBB.threads. Ask us about our free migration services to migrate your UBB.threads installation."
#206306 - 02/12/08 01:43 PM Re: General MySQL question [Re: Basil]
David Dreezer Offline

Pooh-Bah
Registered: 07/21/06
Posts: 2199
Instead of doing that log into MySQL via command line and run this command: show processlist; Copy that and paste it into word or notepad and post it here. Let's find out what it's bogging down on instead of just rebooting it. That will not make the problem go away.

You can also get that from phpmyadmin by the way. You'll want to be logged in as MySQL's root operator in order to get the full list.


Edited by David Dreezer (02/12/08 01:43 PM)
_________________________
This thread for sale. Click here!
Top
#206321 - 02/12/08 10:21 PM Re: General MySQL question [Re: David Dreezer]
Basil Offline
addict
Registered: 08/18/06
Posts: 685
Loc: Southwest US
Welll, its not having a problem at the moment, but when I do that commnand, I get this:

mysql> show processlist;
+--------+-----------+-----------+----------+---------+------+-------+------------------+
| Id | User | Host | db | Command | Time | State | Info |
+--------+-----------+-----------+----------+---------+------+-------+------------------+
| 2621 | ccc_xxxx | localhost | xx_lore | Sleep | 2573 | | NULL |
| 2797 | ccc_xxxx | localhost | xx_lore | Sleep | 5960 | | NULL |
| 2814 | ccc_xxxx | localhost | xx_lore | Sleep | 3838 | | NULL |
| 2821 | ccc_xxxx | localhost | xx_lore | Sleep | 3838 | | NULL |
| 2877 | ccc_xxxx | localhost | xx_lore | Sleep | 4292 | | NULL |
| 3030 | ccc_xxxx | localhost | xx_lore | Sleep | 2159 | | NULL |
| 8637 | ccc_xxxx | localhost | xx_lore | Sleep | 3867 | | NULL |
| 17311 | ccc_xxxx | localhost | xx_lore | Sleep | 4139 | | NULL |
| 26708 | ccc_xxxx | localhost | xx_lore | Sleep | 3884 | | NULL |
| 27464 | ccc_xxxx | localhost | xx_lore | Sleep | 9490 | | NULL |
| 428940 | ccc_xxxx | localhost | NULL | Query | 0 | NULL | show processlist |
+--------+-----------+-----------+----------+---------+------+-------+------------------+


(I've changed the user name. The Lore database is a knowledge base that doesn't get used much. What I guess I don't under stand is what I
m not seeing and processed related to my threads DB? GUess I don't understand what this is showing me?
Top
#206325 - 02/13/08 03:42 AM Re: General MySQL question [Re: Basil]
Gizmo Offline

Registered: 06/05/06
Posts: 14995
Loc: Portland, OR; USA
Threads caches data outputted by queries.
_________________________
Forums: UGN Security & VNC Web Design & Development
UBB.Threads: UBB.Wiki, My UBBSkins, UBB.Sitemaps
Longtime UBB Supporter, UBB Beta Tester & Resident Post-A-Holic.
UBB Modifications, Styling, Coding Services, Disaster Recovery, and more!
Top
#206330 - 02/13/08 08:35 AM Re: General MySQL question [Re: Gizmo]
Basil Offline
addict
Registered: 08/18/06
Posts: 685
Loc: Southwest US
Just for curiosity, I clicked on "Run Time Information" in My PhPAdmin and saw some of the stats listed in red (which I assume means not good)? Keep in mind that Threads is not the only Database running on my site. The items that show is red are specifically:

Slow_queries 537 - The number of queries that have taken more than long_query_time seconds.

Handler_read_rnd 2,582 k - The number of requests to read a row based on a fixed position.

Handler_read_rnd_next 338 M - The number of requests to read the next row in the data file. This is high if you are doing a lot of table scans. Generally this suggests that your tables are not properly indexed or that your queries are not written to take advantage of the indexes you have.

Qcache_lowmem_prunes 18 k The number of queries that have been removed from the cache to free up memory for caching new queries. This information can help you tune the query cache size. The query cache uses a least recently used (LRU) strategy to decide which queries to remove from the cache.

Created_tmp_disk_tables 117 The number of temporary tables on disk created automatically by the server while executing statements. If Created_tmp_disk_tables is big, you may want to increase the tmp_table_size value to cause temporary tables to be memory-based instead of disk-based.

Select_full_join 8,248 The number of joins that do not use indexes. If this value is not 0, you should carefully check the indexes of your tables.

Sort_merge_passes 23 The number of merge passes the sort algorithm has had to do. If this value is large, you should consider increasing the value of the sort_buffer_size system variable.

Opened_tables 3,166 The number of tables that have been opened. If opened tables is big, your table cache value is probably too small.

Table_locks_waited 14 k The number of times that a table lock could not be acquired immediately and a wait was needed. If this is high, and you have performance problems, you should first optimize your queries, and then either split your table or tables or use replication.

Any of this suggest different setting in MySQL?
Top
#206334 - 02/13/08 01:17 PM Re: General MySQL question [Re: Basil]
David Dreezer Offline

Pooh-Bah
Registered: 07/21/06
Posts: 2199
The number of queries in show processlist when nothing is going wrong is what I'd expect. None.

It's when things are not going right that the list is important. We can see the query that's running long and probably has a table locked, backing up the whole works.

Logging slow queries would help too, you've got a few there.

14 thousand table_locks_waited is really not good.

try this script, run it from command line and see what it tells you, it's written by a MySQL developer and is a great help.

http://www.day32.com/MySQL/
_________________________
This thread for sale. Click here!
Top
#206335 - 02/13/08 01:18 PM Re: General MySQL question [Re: David Dreezer]
David Dreezer Offline

Pooh-Bah
Registered: 07/21/06
Posts: 2199
The tuning primer script, top line.
_________________________
This thread for sale. Click here!
Top
#206339 - 02/13/08 02:03 PM Re: General MySQL question [Re: Basil]
jgeoff Offline
Pooh-Bah
Registered: 08/08/06
Posts: 1922
Loc: NJ
Originally Posted By: Basil
The items that show is red are specifically:

Slow_queries 537 - The number of queries that have taken more than long_query_time seconds.

Handler_read_rnd 2,582 k - The number of requests to read a row based on a fixed position.

Handler_read_rnd_next 338 M - The number of requests to read the next row in the data file. This is high if you are doing a lot of table scans. Generally this suggests that your tables are not properly indexed or that your queries are not written to take advantage of the indexes you have.

Qcache_lowmem_prunes 18 k The number of queries that have been removed from the cache to free up memory for caching new queries. This information can help you tune the query cache size. The query cache uses a least recently used (LRU) strategy to decide which queries to remove from the cache.

Created_tmp_disk_tables 117 The number of temporary tables on disk created automatically by the server while executing statements. If Created_tmp_disk_tables is big, you may want to increase the tmp_table_size value to cause temporary tables to be memory-based instead of disk-based.

Select_full_join 8,248 The number of joins that do not use indexes. If this value is not 0, you should carefully check the indexes of your tables.

Sort_merge_passes 23 The number of merge passes the sort algorithm has had to do. If this value is large, you should consider increasing the value of the sort_buffer_size system variable.

Opened_tables 3,166 The number of tables that have been opened. If opened tables is big, your table cache value is probably too small.

Table_locks_waited 14 k The number of times that a table lock could not be acquired immediately and a wait was needed. If this is high, and you have performance problems, you should first optimize your queries, and then either split your table or tables or use replication.


Out of curiosity I ran the same thing to compare...

Slow_queries 642
Handler_read_rnd 30 M
Handler_read_rnd_next 913 M
Qcache_lowmem_prunes 141 k
Slow_launch_threads 4 - The number of threads that have taken more than slow_launch_time seconds to create
Created_tmp_disk_tables 13 k
Select_full_join 1,418
Select_range_check 4 - The number of joins without keys that check for key usage after each row. (If this is not 0, you should carefully check the indexes of your tables.)
Opened_tables 23 k
Table_locks_waited 3,349

I only have one active database, on a shared server. Dumb question, but is this server-wide, or just me? Some of them seem out of control!
_________________________
GangsterBB.NET (Ver. 7.5.6)
2007 Content Rulez Contest - Hon Mention
UBB.classic 6.7.2 - RIP
Browsers: Chrome, Firefox, & Safari (Win7 and iPhone); No IE, ever!
Top
#206343 - 02/13/08 07:19 PM Re: General MySQL question [Re: jgeoff]
David Dreezer Offline

Pooh-Bah
Registered: 07/21/06
Posts: 2199
I'd think it was the entire server.
_________________________
This thread for sale. Click here!
Top
#206358 - 02/14/08 09:45 AM Re: General MySQL question [Re: David Dreezer]
Basil Offline
addict
Registered: 08/18/06
Posts: 685
Loc: Southwest US
Originally Posted By: David Dreezer
It's when things are not going right that the list is important. We can see the query that's running long and probably has a table locked, backing up the whole works.


Ok, the next time the site starts bogging down, I'll SSH in and try it again.
Top
Page 1 of 4 1 2 3 4 >



Moderator:  AllenAyres, Harold, Ian, Ron M 
Shout Box

Today's Birthdays
No Birthdays
Recent Topics
Due Date Calculator-Calculate When Your Baby is Due
by StewartMyduedate
Today at 12:54 AM
Temporary Password email not being received
by
05/24/12 10:02 PM
Ability to "like" individual posts (not Facebook "likes)
by doug
05/23/12 09:03 AM
Island Permissions
by ThreadsUser
05/22/12 03:03 PM
streaming video
by prkrgrp
05/20/12 07:02 PM
Forum Stats
10491 Members
36 Forums
33842 Topics
181709 Posts

Max Online: 978 @ 06/24/07 11:19 PM
Random Image