mySQL Server Last

MySQL, PostgreSQL, SQLite
sintec
Posts: 54
Joined: 2006-10-10 22:34
 

Re: mySQL Server Last

Post by sintec »

ddm3ve wrote:Hast Du den mysql zwischendurch upgegraded?

5.1.58-1~dotdeb.0

Wie sieht die Konfiguration aus?
Du hast mir den Befehl gegeben mich um ein Update zu kümmern. :)

Welche Konfig willst haben? php.ini?
ddm3ve
Moderator
Moderator
Posts: 1237
Joined: 2011-07-04 10:56
 

Re: mySQL Server Last

Post by ddm3ve »

Naja, ein DB Upgrade erorder i.d.R. mehr als nur den mysqld umzugraben. Pphp perl etc. muss natürlich auch gegen die neuen libs / Clientlibs gebaut werden.

eigentlich interessiert mich nur die my.ini.

Die Tabellen kannst Du mit ein bisschen Scripting Know how auch automatisiert auf Innodb umstellen. Aber Achtung, das müssen auch Deine Anwendungen schlucken!
Im Betrieb macht das i.d.R. weniger Problem, aber bei upgrades eines CMS z.B. kann das Probleme bereiten.

Eine Liste der Tabellen erhälst Du aus dem Information Schema. Dort finden sich alle Tabellen.
Datenbanken und Tabellen stehen unter information_schema.tables.
Aber Vorsicht, von den Datenbanken information_schema und mysql musst Du die Finger lassen. Suche ebenfalls nur nach Tabellen mit Engine MyIsam.

-> Altert table `******` ENGINE = INNODB

***** durch den Tabellenname ersetzen z.B. <databse/schema>.<tabellenname>

Vorher aber ein Backup erstellen !
Last edited by ddm3ve on 2011-08-29 00:48, edited 2 times in total.
02:32:12 21.12.2012 und dann sind Deine Probleme alle unwichtig.
sintec
Posts: 54
Joined: 2006-10-10 22:34
 

Re: mySQL Server Last

Post by sintec »

Also, dass System hat auch sämtliche weiteren Pakete mitinstalliert. mysq-server-5.1, mysql-client-5.1 und all die ganzen Sachen wurden mit erneuert.

Code: Select all

NULL 	inad 	adserver_ads 	BASE TABLE 	MyISAM 	10 	Dynamic 	276 	171 	47268 	281474976710655 	25600 	0 	759 	2011-08-25 19:19:52 	2011-08-28 20:20:46 	2011-08-28 20:20:46 	utf8_general_ci 	NULL 	  	 
NULL 	inad 	adserver_billing 	BASE TABLE 	MyISAM 	10 	Dynamic 	0 	0 	0 	281474976710655 	1024 	0 	NULL 	2011-08-25 19:19:52 	2011-08-28 20:20:46 	2011-08-28 20:20:46 	utf8_general_ci 	NULL 	  	 
NULL 	inad 	adserver_block 	BASE TABLE 	MyISAM 	10 	Dynamic 	313844 	29 	10327656 	281474976710655 	2217984 	1031948 	NULL 	2011-08-25 22:52:10 	2011-08-29 00:49:19 	2011-08-28 20:20:46 	utf8_general_ci 	NULL 	  	 
NULL 	inad 	adserver_ordered 	BASE TABLE 	MyISAM 	10 	Dynamic 	0 	0 	0 	281474976710655 	1024 	0 	14 	2011-08-25 19:19:54 	2011-08-25 19:19:54 	NULL 	utf8_general_ci 	NULL 	  	 
NULL 	inad 	adserver_publisher 	BASE TABLE 	MyISAM 	10 	Dynamic 	0 	0 	0 	281474976710655 	1024 	0 	4 	2011-08-25 19:19:54 	2011-08-25 19:19:54 	NULL 	utf8_general_ci 	NULL 	  	 
NULL 	inad 	adserver_publisherads 	BASE TABLE 	MyISAM 	10 	Dynamic 	0 	0 	0 	281474976710655 	1024 	0 	NULL 	2011-08-25 19:19:54 	2011-08-25 19:19:54 	NULL 	utf8_general_ci 	NULL 	  	 
NULL 	inad 	adserver_reload 	BASE TABLE 	MyISAM 	10 	Dynamic 	0 	0 	0 	281474976710655 	1024 	0 	NULL 	2011-08-25 19:19:54 	2011-08-25 19:19:54 	NULL 	latin1_swedish_ci 	NULL 	  	 
NULL 	inad 	adserver_stat 	BASE TABLE 	MyISAM 	10 	Dynamic 	218 	108 	23544 	281474976710655 	5120 	0 	561 	2011-08-25 19:19:54 	2011-08-25 19:19:54 	NULL 	latin1_swedish_ci 	NULL 	  	 
NULL 	inad 	adserver_temp 	BASE TABLE 	MyISAM 	10 	Dynamic 	0 	0 	0 	281474976710655 	1024 	0 	NULL 	2011-08-25 19:19:54 	2011-08-28 20:20:46 	2011-08-28 20:20:46 	utf8_general_ci 	NULL 	  	 
NULL 	inad 	adserver_users 	BASE TABLE 	MyISAM 	10 	Dynamic 	1 	72 	72 	281474976710655 	2048 	
Genügt es nicht, an dieser Datenbank (inad) die Engine komplett umzustellen, dass ist die DB die so heftig frequentiert ist?
ddm3ve
Moderator
Moderator
Posts: 1237
Joined: 2011-07-04 10:56
 

Re: mySQL Server Last

Post by ddm3ve »

Nein, die Engine wird mit der Tabelle definiert. Du willst aber auch vermeiden, dass andere Tabellen mit z.B. Engine Memory etc. auch geändert werden.

Fürs erste genügt es auch, wenn Du die Problemtabellen umstellst.

Was ich damit meine, ist dass man die Tabellen nicht über einen alter database... Befehl umstellen kann. Natürlich kannst Du die Arbeit aber auf die problematischen Tabellen begrenzen. Das muss nicht zwangsläufig DB weit erfolgen.

Wie sieht die my.cnf jetzt aus?
Last edited by ddm3ve on 2011-08-29 00:56, edited 1 time in total.
02:32:12 21.12.2012 und dann sind Deine Probleme alle unwichtig.
sintec
Posts: 54
Joined: 2006-10-10 22:34
 

Re: mySQL Server Last

Post by sintec »

Code: Select all

mysql> use inad;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> Altert table `adserver_block` ENGINE = INNODB;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that                   ne 1
mysql> Altert table 'adserver_block' ENGINE = INNODB;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that                   ne 1
mysql> Alter table 'adserver_block' ENGINE = INNODB;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
mysql> Alter table adserver_block ENGINE = INNODB;
Query OK, 313260 rows affected (19.62 sec)
Records: 313260  Duplicates: 0  Warnings: 0

mysql> Alter table adserver_ads ENGINE = INNODB;
Query OK, 276 rows affected, 1 warning (0.04 sec)
Records: 276  Duplicates: 0  Warnings: 0

mysql> Alter table adserver_billing ENGINE = INNODB;
Query OK, 0 rows affected (0.13 sec)
Records: 0  Duplicates: 0  Warnings: 0

mysql> Alter table adserver_ordered ENGINE = INNODB;
Query OK, 0 rows affected (0.01 sec)
Records: 0  Duplicates: 0  Warnings: 0

mysql> Alter table adserver_publisher ENGINE = INNODB;
Query OK, 0 rows affected (0.01 sec)
Records: 0  Duplicates: 0  Warnings: 0

mysql> Alter table adserver_publisherads ENGINE = INNODB;
Query OK, 0 rows affected (0.01 sec)
Records: 0  Duplicates: 0  Warnings: 0

mysql> Alter table adserver_reload ENGINE = INNODB;
Query OK, 0 rows affected (0.01 sec)
Records: 0  Duplicates: 0  Warnings: 0

mysql> Alter table adserver_stat ENGINE = INNODB;
Query OK, 218 rows affected (0.02 sec)
Records: 218  Duplicates: 0  Warnings: 0

mysql> Alter table adserver_temp ENGINE = INNODB;
Query OK, 0 rows affected (0.01 sec)
Records: 0  Duplicates: 0  Warnings: 0

mysql> Alter table adserver_users ENGINE = INNODB;
Query OK, 1 row affected (0.01 sec)
Records: 1  Duplicates: 0  Warnings: 0
/etc/mysql/my.cnf

Code: Select all

#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
# 
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html

# This will be passed to all mysql clients
# It has been reported that passwords should be enclosed with ticks/quotes
# escpecially if they contain "#" chars...
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
[client]
port		= 3306
socket		= /var/run/mysqld/mysqld.sock

# Here is entries for some specific programs
# The following values assume you have at least 32M ram

# This was formally known as [safe_mysqld]. Both versions are currently parsed.
[mysqld_safe]
socket		= /var/run/mysqld/mysqld.sock
nice		= 0

[mysqld]
#
# * Basic Settings
#
user		= mysql
pid-file	= /var/run/mysqld/mysqld.pid
socket		= /var/run/mysqld/mysqld.sock
port		= 3306
basedir		= /usr
datadir		= /var/lib/mysql
tmpdir		= /tmp
language	= /usr/share/mysql/english
skip-external-locking
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address		= 127.0.0.1
#
# * Fine Tuning
#
key_buffer		= 64M
max_allowed_packet	= 16M
#myisam_sort_buffer_size = 64M
thread_stack		= 126K
#thread_cache_size	= 8
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover	       = BACKUP
max_connections        = 250
table_cache            = 1024
thread_cache_size      = 100
sort_buffer_size       = 256K
read_buffer_size       = 1M
read_rnd_buffer_size   = 256K
join_buffer_size       = 1M
#thread_concurrency    = 10
#
# * Query Cache Configuration
#
query_cache_limit       = 16M
query_cache_size        = 128M
query_cache_type	= 1
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
#log		= /var/log/mysql/mysql.log
#
# Error logging goes to syslog. This is a Debian improvement :)
#
# Here you can see queries with especially long duration
#long_query_time                 = 5
#log-queries-not-using-indexes   = 1
#slow_query_log                  = 1
#log-slow-queries                = /var/log/mysql/mysql-slow.log

#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
#       other settings you may need to change.
#server-id		= 1
#log_bin		= /var/log/mysql/mysql-bin.log
expire_logs_days	= 10
max_binlog_size         = 100M
#binlog_do_db		= include_database_name
#binlog_ignore_db	= include_database_name
#
# * BerkeleyDB
#
# Using BerkeleyDB is now discouraged as its support will cease in 5.1.12.
#skip-bdb
#
# * InnoDB
#
#    binlog_format                   = mixed
#    innodb_file_per_table           = 1
#    innodb_buffer_pool_size         = 4G
#    innodb_additional_mem_pool_size = 128M
#    innodb_data_home_dir            = /var/lib/mysql/
#    innodb_data_file_path           = ibdata1:10M:autoextend
#    innodb_autoextend_increment     = 10
#    innodb_log_group_home_dir       = /var/lib/mysql/
#    innodb_log_files_in_group       = 3
#    innodb_log_file_size            = 250M
#    innodb_log_buffer_size          = 128M
#    innodb_flush_log_at_trx_commit  = 1
#    innodb_flush_method             = O_DIRECT
#   innodb_thread_concurrency       = 8
#   innodb_commit_concurrency       = 8
#   transaction-isolation                  = READ-COMMITTED

#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
# You might want to disable InnoDB to shrink the mysqld process by circa 100MB.
#skip-innodb
#
# * Security Features
#
# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/
#
# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
#
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem



[mysqldump]
quick
quote-names
max_allowed_packet	= 16M

[mysql]
#no-auto-rehash	# faster start of mysql but no tab completition

[isamchk]
key_buffer		= 16M

#
# * NDB Cluster
#
# See /usr/share/doc/mysql-server-*/README.Debian for more information.
#
# The following configuration is read by the NDB Data Nodes (ndbd processes)
# not from the NDB Management Nodes (ndb_mgmd processes).
#
# [MYSQL_CLUSTER]
# ndb-connectstring=127.0.0.1


#
# * IMPORTANT: Additional settings that can override those from this file!
#   The files must end with '.cnf', otherwise they'll be ignored.
#
!includedir /etc/mysql/conf.d/
Sorry, für die Kommentare in der my.cnf.. :(
Last edited by sintec on 2011-08-29 00:59, edited 1 time in total.
ddm3ve
Moderator
Moderator
Posts: 1237
Joined: 2011-07-04 10:56
 

Re: mySQL Server Last

Post by ddm3ve »

Folgende Parameter solltest Du problemfrei auskommentieren können.

Code: Select all

innodb_buffer_pool_size         = 4G
innodb_additional_mem_pool_size = 128M
innodb_flush_log_at_trx_commit  = 1
innodb_flush_method             = O_DIRECT
innodb_thread_concurrency       = 8
innodb_commit_concurrency       = 8
Prüfe vorher ob nicht woanders der jeweilige Parameter schon definiert wurde in der my.cnf

Dann gut 24 Stunden warten und Tuning-primer.sh erneut ausführen.
02:32:12 21.12.2012 und dann sind Deine Probleme alle unwichtig.
sintec
Posts: 54
Joined: 2006-10-10 22:34
 

Re: mySQL Server Last

Post by sintec »

Gut, ich werde die Werte noch auskommentieren, den mysql neustarten und melde mich dann spätestens innerhalb von 24 Std.

BTW: Die Webseiten sind derzeit mit spitzen Reaktionszeiten erreichbar! Ich kann nun nicht genau nachvollziehen, ob das wegen den Umstellungen der mysql ist, oder ob es am sinkeren Traffic liegt wegen der Nachtruhe. :)

Aber ein wahnsinniges Lob an Dich! BTW: Kannst mir ein gutes Buch zwecks MyIsam vs. InnoDB @ Amazon empfehlen? (Ref-Link erwünscht) :)
ddm3ve
Moderator
Moderator
Posts: 1237
Joined: 2011-07-04 10:56
 

Re: mySQL Server Last

Post by ddm3ve »

http://www.amazon.de/Performance-Optimi ... 367&sr=8-2

Und dazu noch:

http://www.mysqlperformanceblog.com/200 ... tallation/

Ich denke an der Stelle bringt der Upgrade auf 5.1 am meisten performance Schub, allein schon deshalb, weil diverse Bugs im SQL Optimizer gefixt wurden.

Man muss etwas genauer verstehen, was intern ab läuft, dazu ist das zwar schon etwas ältere Buch aber immer noch aktuell und gut für Deine Version 5.1.
02:32:12 21.12.2012 und dann sind Deine Probleme alle unwichtig.
sintec
Posts: 54
Joined: 2006-10-10 22:34
 

Re: mySQL Server Last

Post by sintec »

Ein Dank für die Empfehlung, werde mir das Buch bestellen und zu den anderen stellen, hoffe/denke ist ein gutes Nachschlagwerk. :)

BTW zum heutigen Abschluss:

Code: Select all

23m1015:/backup/mysql# /etc/init.d/mysql restart
Stopping MySQL database server: mysqld.
Starting MySQL database server: mysqld ..
Checking for tables which need an upgrade, are corrupt or were
not closed cleanly..
Not closed cleanly.. = Muss man darauf acht geben? Die Google-Suche liefert mal wieder erschreckende Ergebnisse von wegen "nicht mehr reparable Datenbanken" (zumindest das dies irgendwann eintreffen "könnte")
Last edited by sintec on 2011-08-29 01:27, edited 1 time in total.
ddm3ve
Moderator
Moderator
Posts: 1237
Joined: 2011-07-04 10:56
 

Re: mySQL Server Last

Post by ddm3ve »

Hi,

ja das kann die Folge sein. Irreparable Tabellen, mysql führt zum startup jedoch selbständig eine Reparatur / check durch. Daher auch die Meldung, er hat aber nichts gefunden, sonst würden Tabellen bemängelt werden und repariert werden.
Wären diese defekt wäre mysql nicht hoch gefahren also nicht dramatisch die Meldung.

Für Dich bedeutet dies, dass der Mysqld immer sauber herunter gefahren werden sollte. Netzstecker ziehen, wenn die Datenbank noch Daten raus schreibt kann fatale Folgen haben.
Last edited by ddm3ve on 2011-08-29 01:30, edited 1 time in total.
02:32:12 21.12.2012 und dann sind Deine Probleme alle unwichtig.
ddm3ve
Moderator
Moderator
Posts: 1237
Joined: 2011-07-04 10:56
 

Re: mySQL Server Last

Post by ddm3ve »

BTW. das Buch nicht in den Schrank stellen, sondern in der Tat durchlesen.
Das ist sehr Wissenswert, was dort zu finden und erfahren ist.

Ein anderes Schmankerl wäre ggf.

http://www.amazon.de/Understanding-MySQ ... 332&sr=1-2

Vorerst aber Gute Nacht.
02:32:12 21.12.2012 und dann sind Deine Probleme alle unwichtig.
User avatar
Joe User
Project Manager
Project Manager
Posts: 11191
Joined: 2003-02-27 01:00
Location: Hamburg
Contact:
 

Re: mySQL Server Last

Post by Joe User »

sintec wrote:BTW: Wem kommt der PayPal-Donate Button eigentlich zugute? Dem Seitenbetreiber alleine?
Mit den extrem seltenen PayPal-Spenden wurde ein Teil des nötigen Kaffee für den Serveradministrator (mich) bezahlt.
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
sintec
Posts: 54
Joined: 2006-10-10 22:34
 

Re: mySQL Server Last

Post by sintec »

[quote="Joe User"]BTW: Wem kommt der PayPal-Donate Button eigentlich zugute? Dem Seitenbetreiber alleine?
Mit den extrem seltenen PayPal-Spenden wurde ein Teil des nötigen Kaffee für den Serveradministrator (mich) bezahlt.[/quote]

Selten genutzt? Das glaubst doch wohl selber nicht. :)
Kann mir schon gut vorstellen, dass bei eurer Hilfe zahlreiche Leute ein kleine Spende tätigen. :)

BTW: Die Erreichbarkeit des Webservers ist wieder total zusammen gebrochen.

Code: Select all

top - 17:22:19 up 3 days, 23:39,  1 user,  load average: 1.52, 1.06, 1.04
Tasks: 1358 total,   1 running, 1357 sleeping,   0 stopped,   0 zombie
Cpu0  : 10.5%us,  1.3%sy,  0.0%ni, 87.3%id,  0.3%wa,  0.0%hi,  0.7%si,  0.0%st
Cpu1  :  8.5%us,  0.7%sy,  0.0%ni, 90.2%id,  0.0%wa,  0.0%hi,  0.7%si,  0.0%st
Cpu2  :  7.5%us,  1.3%sy,  0.0%ni, 88.9%id,  0.3%wa,  0.3%hi,  1.6%si,  0.0%st
Cpu3  :  9.2%us,  1.3%sy,  0.0%ni, 86.9%id,  0.7%wa,  0.0%hi,  2.0%si,  0.0%st
Mem:   8199492k total,  5817488k used,  2382004k free,   300760k buffers
Swap:  5855684k total,      676k used,  5855008k free,   614576k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 3808 mysql     20   0 5440m 655m 7176 S   22  8.2 650:08.08 mysqld
14116 root      20   0 19900 2280  952 R    1  0.0   0:03.52 top
 3180 www-data  20   0  188m 9.9m 3932 S    1  0.1   0:06.96 apache2
 3250 www-data  20   0  188m  10m 3892 S    1  0.1   0:06.88 apache2
27715 root      20   0  184m  14m 9820 S    1  0.2   0:19.70 apache2
27728 www-data  20   0  188m  10m 3960 S    1  0.1   0:07.94 apache2
27734 www-data  20   0  188m  10m 4016 S    1  0.1   0:07.98 apache2
27827 www-data  20   0  188m  10m 3944 S    1  0.1   0:08.08 apache2
27896 www-data  20   0  210m  33m 4556 S    1  0.4   0:08.16 apache2
27914 www-data  20   0  188m  10m 4040 S    1  0.1   0:07.94 apache2
28101 www-data  20   0  188m  10m 4008 S    1  0.1   0:07.84 apache2
28165 www-data  20   0  188m  10m 3928 S    1  0.1   0:07.88 apache2
28180 www-data  20   0  188m   9m 3952 S    1  0.1   0:08.04 apache2
28218 www-data  20   0  188m  10m 4040 S    1  0.1   0:07.94 apache2
28232 www-data  20   0  188m 9988 3948 S    1  0.1   0:07.78 apache2
28286 www-data  20   0  188m  10m 4020 S    1  0.1   0:08.14 apache2
28473 www-data  20   0  188m   9m 4012 S    1  0.1   0:07.98 apache2
28501 www-data  20   0  186m 9976 3532 S    1  0.1   0:07.76 apache2
28524 www-data  20   0  188m 9.9m 3916 S    1  0.1   0:07.76 apache2
28540 www-data  20   0  188m  10m 3932 S    1  0.1   0:07.82 apache2
28601 www-data  20   0  188m  10m 3932 S    1  0.1   0:08.00 apache2
28639 www-data  20   0  188m  10m 4008 S    1  0.1   0:08.08 apache2
28648 www-data  20   0  188m  10m 3948 S    1  0.1   0:07.94 apache2
28655 www-data  20   0  187m 9908 3944 S    1  0.1   0:07.92 apache2
28679 www-data  20   0  188m   9m 4004 S    1  0.1   0:08.18 apache2
28737 www-data  20   0  188m  10m 4168 S    1  0.1   0:08.04 apache2
    1 root      20   0 10316  756  624 S    0  0.0   0:03.34 init
    2 root      15  -5     0    0    0 S    0  0.0   0:00.00 kthreadd
    3 root      RT  -5     0    0    0 S    0  0.0   0:00.02 migration/0
    4 root      15  -5     0    0    0 S    0  0.0   0:02.98 ksoftirqd/0

Code: Select all

23m1015:~# ./tuning-primer.sh

        -- MYSQL PERFORMANCE TUNING PRIMER --
             - By: Matthew Montgomery -

MySQL Version 5.1.58-1~dotdeb.0 x86_64

Uptime = 0 days 15 hrs 58 min 20 sec
Avg. qps = 489
Total Questions = 28130924
Threads Connected = 2

Warning: Server has not been running for at least 48hrs.
It may not be safe to use these recommendations

To find out more information on how each of these
runtime variables effects performance visit:
http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html
Visit http://www.mysql.com/products/enterprise/advisors.html
for info about MySQL's Enterprise Monitoring and Advisory Service

SLOW QUERIES
The slow query log is NOT enabled.
Current long_query_time = 10.000000 sec.
You have 0 out of 28131034 that take longer than 10.000000 sec. to complete
Your long_query_time seems to be fine

BINARY UPDATE LOG
The binary update log is NOT enabled.
You will not be able to do point in time recovery
See http://dev.mysql.com/doc/refman/5.1/en/point-in-time-recovery.html

WORKER THREADS
Current thread_cache_size = 100
Current threads_cached = 54
Current threads_per_sec = 0
Historic threads_per_sec = 0
Your thread_cache_size is fine

MAX CONNECTIONS
Current max_connections = 250
Current threads_connected = 1
Historic max_used_connections = 55
The number of used connections is 22% of the configured maximum.
Your max_connections variable seems to be fine.

INNODB STATUS
Current InnoDB index space = 20 M
Current InnoDB data space = 17 M
Current InnoDB buffer pool free = 97 %
Current innodb_buffer_pool_size = 4.00 G
Depending on how much space your innodb indexes take up it may be safe
to increase this value to up to 2 / 3 of total system memory

MEMORY USAGE
Max Memory Ever Allocated : 4.45 G
Configured Max Per-thread Buffers : 656 M
Configured Max Global Buffers : 4.31 G
Configured Max Memory Limit : 4.95 G
Physical Memory : 7.81 G
Max memory limit seem to be within acceptable norms

KEY BUFFER
Current MyISAM index space = 5 M
Current key_buffer_size = 64 M
Key cache miss rate is 1 : 8595
Key buffer free ratio = 79 %
Your key_buffer_size seems to be fine

QUERY CACHE
Query cache is enabled
Current query_cache_size = 128 M
Current query_cache_used = 3 M
Current query_cache_limit = 16 M
Current Query cache Memory fill ratio = 2.72 %
Current query_cache_min_res_unit = 4 K
Your query_cache_size seems to be too high.
Perhaps you can use these resources elsewhere
MySQL won't cache query results that are larger than query_cache_limit in size

SORT OPERATIONS
Current sort_buffer_size = 256 K
Current read_rnd_buffer_size = 256 K
Sort buffer seems to be fine

JOINS
Current join_buffer_size = 1.00 M
You have had 0 queries where a join could not use an index properly
Your joins seem to be using indexes properly

OPEN FILES LIMIT
Current open_files_limit = 2308 files
The open_files_limit should typically be set to at least 2x-3x
that of table_cache if you have heavy MyISAM usage.
Your open_files_limit value seems to be fine

TABLE CACHE
Current table_open_cache = 1024 tables
Current table_definition_cache = 256 tables
You have a total of 104 tables
You have 169 open tables.
The table_cache value seems to be fine

TEMP TABLES
Current max_heap_table_size = 16 M
Current tmp_table_size = 16 M
Of 5546634 temp tables, 0% were created on disk
Created disk tmp tables ratio seems fine

TABLE SCANS
Current read_buffer_size = 1 M
Current table scan ratio = 245 : 1
read_buffer_size seems to be fine

TABLE LOCKING
Current Lock Wait ratio = 1 : 12361
Your table locking seems to be fine

Code: Select all

23m1015:~# ./mysqltuner.pl

 >>  MySQLTuner 1.2.0 - Major Hayden <major@mhtx.net>
 >>  Bug reports, feature requests, and downloads at http://mysqltuner.com/
 >>  Run with '--help' for additional options and output filtering

-------- General Statistics --------------------------------------------------
[--] Skipped version check for MySQLTuner script
[OK] Currently running supported MySQL version 5.1.58-1~dotdeb.0
[OK] Operating on 64-bit architecture

-------- Storage Engine Statistics -------------------------------------------
[--] Status: +Archive -BDB -Federated +InnoDB -ISAM -NDBCluster
[--] Data in MyISAM tables: 10M (Tables: 71)
[--] Data in InnoDB tables: 17M (Tables: 10)
[!!] Total fragmented tables: 17

-------- Security Recommendations  -------------------------------------------
[OK] All database users have passwords assigned

-------- Performance Metrics -------------------------------------------------
[--] Up for: 15h 58m 51s (28M q [489.257 qps], 4M conn, TX: 4B, RX: 8B)
[--] Reads / Writes: 73% / 27%
[--] Total buffers: 4.3G global + 2.6M per thread (250 max threads)
[OK] Maximum possible memory usage: 5.0G (63% of installed RAM)
[OK] Slow queries: 0% (0/28M)
[OK] Highest usage of available connections: 22% (55/250)
[OK] Key buffer size / total MyISAM indexes: 64.0M/5.4M
[OK] Key buffer hit rate: 100.0% (13M cached / 1K reads)
[OK] Query cache efficiency: 23.6% (2M cached / 11M selects)
[OK] Query cache prunes per day: 0
[OK] Sorts requiring temporary tables: 0% (0 temp sorts / 5M sorts)
[OK] Temporary tables created on disk: 0% (90 on disk / 5M total)
[OK] Thread cache hit rate: 99% (56 created / 4M connections)
[OK] Table cache hit rate: 28% (169 open / 592 opened)
[OK] Open file limit used: 8% (199/2K)
[OK] Table locks acquired immediately: 99% (12M immediate / 12M locks)
[OK] InnoDB data size / buffer pool: 17.3M/4.0G

-------- Recommendations -----------------------------------------------------
General recommendations:
    Run OPTIMIZE TABLE to defragment tables for better performance
    MySQL started within last 24 hours - recommendations may be inaccurate
    Enable the slow query log to troubleshoot bad queries
Kann es evtl. auch am Apache2 liegen? Ich mein der "server-status" sieht auch sehr merkwürdig aus. Hab das Gefühl, dass dort Zugriffe/Prozesse nicht richtig beendet werden.

Hier mal ein Ausschnitt..

Code: Select all

Apache Server Status for domain.de

Server Version: Apache/2.2.9 (Debian) PHP/5.3.8-1~dotdeb.1 with Suhosin-Patch
Server Built: Dec 11 2010 21:34:00

Current Time: Monday, 29-Aug-2011 17:24:33 CEST
Restart Time: Sunday, 28-Aug-2011 22:47:40 CEST
Parent Server Generation: 0
Server uptime: 18 hours 36 minutes 52 seconds
Total accesses: 10366828 - Total Traffic: 2.5 GB
CPU Usage: u9161.64 s2472.88 cu0 cs0 - 17.4% CPU load
155 requests/sec - 39.9 kB/second - 263 B/request
11 requests currently being processed, 1274 idle workers

________________________C_______________________________________
________________________________________________________________
________________________________________________________________
________________________________________________________________
___________________________________C___________________________C
________________________________________________________________
________________________________________________________________
________________________________________________________________
________________________________________________________________
________________________________________________________________
__________________________________________________________C_____
_________________C______________________________________________
________________________________________________________________
________________________________________________________________
________________________________________________________________
______________________________________________________________C_
________________________________________________________________
__________CC_____C______________W_______________________________
________________________________________________________________
____________________W___________________________________________
_____...........................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
....&
Last edited by sintec on 2011-08-29 17:28, edited 2 times in total.
ddm3ve
Moderator
Moderator
Posts: 1237
Joined: 2011-07-04 10:56
 

Re: mySQL Server Last

Post by ddm3ve »

sintec wrote: Selten genutzt? Das glaubst doch wohl selber nicht. :)
Kann mir schon gut vorstellen, dass bei eurer Hilfe zahlreiche Leute ein kleine Spende tätigen. :)
Nunja, den Rootserver hätte man mit der Menge an Spenden nicht mal finanzieren können.

sintec wrote: BTW: Die Erreichbarkeit des Webservers ist wieder total zusammen gebrochen.
Zuerst einmail, setze die max Connections auf ein vernünftige Mass, 100 reichen dicke.

2. Slow_querys auf 5 Sekunden setzen nicht 10.
3. Current query_cache_min_res_unit = 512 K

Mir scheint, als ob im Hintergrund nicht genug php Prozesse ist ja fastcgi angestartet sind. Das bootleneck scheint mir auf jeden Fall das apache php gespann zu sein, auch wenn mysql gerade mal mit 27% CPU Auslastung daher kommt.

Was den apache angeht, muss Dir leider jemand anderer helfen.
Last edited by ddm3ve on 2011-08-29 18:18, edited 1 time in total.
02:32:12 21.12.2012 und dann sind Deine Probleme alle unwichtig.
ddm3ve
Moderator
Moderator
Posts: 1237
Joined: 2011-07-04 10:56
 

Re: mySQL Server Last

Post by ddm3ve »

BTW: Zum Thema spenen und Zahlungsbereitschaft, da gibt es eine kleine Anektode:

Es war mal ein User der ganz arge sorgen hatte, Server gecrasht.
Den hatte ich damals für den User recoverd am Wochenende des nächtens.
Meinen regulären Stundensatz hatte ich ihm damals genannt. War wohl ok, bis die arbeit getan war.
Dann wollte man sich die Mehrwertsteuer sparen.
Ich bot dem User damals an, den Betrag ohne Steuer ans Rootforum zu spenden.

Ende von der Gesichte:
Geld kam nicht, fadenscheinige ausreden, ich schrieb eine Rechnung.
"Er hatte angeblich keine Paypal Acount aber Markus hat er offensichtlich auch nie nach Kontodaten befragt..."

Gericht befand, er müsse zahlen, auch dem Gerichturteil kam er nicht nach, was dann eine Kontopfändung nach sich zog.
Wurde für den User dann wohl doppelt so teuer.

Also das mit der "Dankbarkeit" ist wohl kein so seblstverständliches Thema.

Wenn Du was spenden willst, ist das sicherlich gerne gesehen.
Wir, das rootforum treffen uns i.d.R. einmal im Jahr in Hamburg.
Die Spenden reichten bisher noch nicht mal für den Betrieb des Rootservers, also auch erst recht nicht für eine Pizza oder Kaffe, beim Treffen. Das wird alles privat finanziert.
Last edited by ddm3ve on 2011-08-29 18:32, edited 1 time in total.
02:32:12 21.12.2012 und dann sind Deine Probleme alle unwichtig.
sintec
Posts: 54
Joined: 2006-10-10 22:34
 

Re: mySQL Server Last

Post by sintec »

Ich verstehe das oftmals nicht. Auch wenn es hier ein Forum ist und für euch sicherlich keine Pflicht ist, hier jemanden zu helfen, sollte man - so finde ich - eine Spende tätigen.

Mein Umzugsservice o.a. mein Steuerberater um die Ecke arbeiten/helfen mir auch nicht für lau! :)

Aber gut.. b2t:

Code: Select all

23m1015:~# nano /etc/mysql/my.cnf
23m1015:~# /etc/init.d/mysql restart
Stopping MySQL database server: mysqld.
Starting MySQL database server: mysqld ..
Checking for tables which need an upgrade, are corrupt or were
not closed cleanly..
23m1015:~# ERROR 1040 (HY000): Too many connections
Kann ich die letzte Zeile ignorieren? :)
Die Spenden reichten bisher noch nicht mal für den Betrieb des Rootservers, also auch erst recht nicht für eine Pizza oder Kaffe, beim Treffen. Das wird alles privat finanziert.
Das ja echt mal nen Witz! .. :-Q
Last edited by sintec on 2011-08-29 18:34, edited 1 time in total.
ddm3ve
Moderator
Moderator
Posts: 1237
Joined: 2011-07-04 10:56
 

Re: mySQL Server Last

Post by ddm3ve »

Hi, nein die kannst Du nicht ignorieren.

Dann müssen wir nochmals an die Datenbank ran.

Also unter der Hand, als Faustformel für die mysql 5.1
gleichzeitige Verbindungen vor allem, laufende Threads grösser 20 kann die DB nicht mehr wirklich gut verarbeiten.
Die Datenbank beginnt schon ab 10 Threads nicht mehr linear zu skalieren.
Daher sollten i.d.R. vor allem bei Deinem Blech 50 Connections ausreichen.
100 sind laut Konfiguration auch noch i.o. es wäe aber zu prüfen, woher die weit über 100 Verbindungen komen und welche abfragen hier auflaufen.
-> "show full processlist;"

Diese abfragen sollten wir dann noch weiter optimieren.
02:32:12 21.12.2012 und dann sind Deine Probleme alle unwichtig.
sintec
Posts: 54
Joined: 2006-10-10 22:34
 

Re: mySQL Server Last

Post by sintec »

Code: Select all

mysql> show full processlist;
+-------+------+-----------+------+---------+------+-------+-----------------------+
| Id    | User | Host      | db   | Command | Time | State | Info                  |
+-------+------+-----------+------+---------+------+-------+-----------------------+
| 49123 | root | localhost | NULL | Query   |    0 | NULL  | show full processlist |
+-------+------+-----------+------+---------+------+-------+-----------------------+
1 row in set (0.00 sec)
Ich muss die Abfrage immer wieder schnell hintereinander ausführen, damit man überhaupt einen laufenden Query findet/bekommt. Dein Std.-Lohn kannst mir auch gerne mal nennen. :)


Hier ist mal was schönes..

Code: Select all

mysql> show full processlist;
+-------+------+-----------+------+---------+------+----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Id    | User | Host      | db   | Command | Time | State                | Info                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
+-------+------+-----------+------+---------+------+----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| 49123 | root | localhost | NULL | Query   |    0 | NULL                 | show full processlist                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| 69739 | inad | localhost | inad | Query   |    0 | Copying to tmp table | SELECT ad_url, ad_id FROM adserver_ads WHERE ad_id != '605' AND ad_id != '636' AND ad_id != '712' AND ad_id != '345' AND ad_id != '432' AND ad_id != '753' AND ad_id != '692' AND ad_id != '458' AND ad_id != '573' AND ad_id != '562' AND ad_id != '637' AND ad_id != '422' AND ad_id != '399' AND ad_id != '212' AND ad_id != '539' AND ad_id != '726' AND ad_id != '641' AND ad_id != '634' AND ad_id != '477' AND ad_id != '669' AND ad_id != '615' AND ad_id != '694' AND ad_id != '665' AND ad_id != '580' AND ad_id != '400' AND ad_id != '180' AND ad_id != '715' AND ad_id != '600' AND ad_id != '268' AND ad_id != '472' AND ad_id != '755' AND ad_id != '743' AND ad_id != '348' AND ad_id != '446' AND ad_id != '231' AND ad_id != '481' AND ad_id != '142' AND ad_id != '482' AND ad_id != '569' AND ad_id != '419' AND ad_id != '297' AND ad_id != '564' AND ad_id != '757' AND ad_id != '723' AND ad_id != '745' AND ad_id != '494' AND ad_id != '621' AND ad_id != '493' AND ad_id != '392' AND ad_id != '699' AND ad_id != '684' AND ad_id != '572' AND ad_id != '671' AND ad_id != '648' AND ad_id != '195' AND ad_id != '222' AND ad_id != '266' AND ad_id != '454' AND ad_id != '430' AND ad_id != '696' AND ad_id != '553' AND ad_id != '474' AND ad_id != '566' AND ad_id != '79' AND ad_id != '502' AND ad_id != '587' AND ad_id != '527' AND ad_id != '590' AND ad_id != '724' AND ad_id != '610' AND ad_id != '164' AND ad_id != '756' AND ad_id != '492' AND ad_id != '257' AND ad_id != '585' AND ad_id != '740' AND ad_id != '239' AND ad_id != '650' AND ad_id != '759' AND ad_id != '439' AND ad_id != '642' AND ad_id != '700' AND ad_id != '364' AND ad_id != '611' AND ad_id != '651' AND ad_id != '682' AND ad_id != '491' AND ad_id != '607' AND ad_id != '675' AND ad_id != '640' AND ad_id != '614' AND ad_id != '380' AND ad_id != '599' AND ad_id != '440' AND ad_id != '735' AND ad_id != '495' AND ad_id != '500' AND ad_id != '645' AND ad_id != '300' AND ad_id != '546' AND ad_id != '752' AND ad_id != '280' AND ad_id != '513' AND ad_id != '716' AND ad_id != '628'  ORDER BY rand() LIMIT 1 |
+-------+------+-----------+------+---------+------+----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2 rows in set (0.00 sec)
Last edited by sintec on 2011-08-29 18:43, edited 1 time in total.
ddm3ve
Moderator
Moderator
Posts: 1237
Joined: 2011-07-04 10:56
 

Re: mySQL Server Last

Post by ddm3ve »

Arg, muss der Order by rand sein?

Das SQL lässt sich auch angenehmer gestalten.

SELECT ad_url, ad_id FROM adserver_ads WHERE ad_id no in ('605','636','712','345'...usw.) ORDER BY rand() LIMIT 1

Wnn Du hier echte zahlen hast, nutze int() und nicht vachar(100) oder wie auch immer das bei dir war. Lege darauf einen index und dann tut das auch besser.

Der order rand() ist aber definititv gemein. Das Ergebniss wird temporär abgelegt und leider diese temporäre Tabelle mit jedem Datensatz, aus der Ergebnismenge neu geschrieben und sortiert.

Ich emfehle Dir, ein kleines Script das per Cronjob aufgrunfen wird und die Ausgabe aus dem Befehl in eine Datei umleitet.

Das ist nur ein exemplarische Beispiel, vollständige Pfade den eigenen Bedürfnissen anpassen.

Code: Select all

mysql -u root --password='*****' -e "show full processlist;"
>> pocess.lst
Betriebst Du eigentlich generell ein Monitoring?
Das solltest Du ggf. machen, so zwischendurch mal was aufrufen liefert leider ungenau Daten, was für ein Tuning nicht ausreichend ist.
Zumindest genügt es mir nicht um Remote übers Forum zu tunen.
Last edited by ddm3ve on 2011-08-29 18:58, edited 3 times in total.
02:32:12 21.12.2012 und dann sind Deine Probleme alle unwichtig.
ddm3ve
Moderator
Moderator
Posts: 1237
Joined: 2011-07-04 10:56
 

Re: mySQL Server Last

Post by ddm3ve »

Für ein grober Monitoring reicht ggf. auch erstmal das hier:

http://serverstats.berlios.de/

Dort findest Du noch Erweiterungen / Plugins für mysql. Wäre ggf. ganz nützlich.
02:32:12 21.12.2012 und dann sind Deine Probleme alle unwichtig.
sintec
Posts: 54
Joined: 2006-10-10 22:34
 

Re: mySQL Server Last

Post by sintec »

Also ein Monitoring-Tool nutze ich bislang nicht. Werde mir das mal anschauen, sobald das "blech" wieder ordentlich läuft. ;)
ddm3ve
Moderator
Moderator
Posts: 1237
Joined: 2011-07-04 10:56
 

Re: mySQL Server Last

Post by ddm3ve »

Bezüglich dem apache macht bitte einen neuen Thread auf.

Debian ist, was di Konfiguration betrifft, nicht mein Fall.

Ich denke mit fast cgi könntest Du noch eine Menge raus holen.
02:32:12 21.12.2012 und dann sind Deine Probleme alle unwichtig.
sintec
Posts: 54
Joined: 2006-10-10 22:34
 

Re: mySQL Server Last

Post by sintec »

So! Also die exit(); Befehle sind nun alle ausgebessert. Desweiteren habe ich den Index auf die Datenbank "inad" auf die IP & die AD_ID gesetzt. Momentan, schnurrt der Server vorsich hin. Webseiten und Werbemittel werden zügig ausgeliefert.

Mal schauen was der morgige Tag sagt, jetzt am Abend ist ja wieder weniger los.
User avatar
Joe User
Project Manager
Project Manager
Posts: 11191
Joined: 2003-02-27 01:00
Location: Hamburg
Contact:
 

Re: mySQL Server Last

Post by Joe User »

sintec wrote:
Joe User wrote:BTW: Wem kommt der PayPal-Donate Button eigentlich zugute? Dem Seitenbetreiber alleine?
Mit den extrem seltenen PayPal-Spenden wurde ein Teil des nötigen Kaffee für den Serveradministrator (mich) bezahlt.
Selten genutzt? Das glaubst doch wohl selber nicht. :)
Kann mir schon gut vorstellen, dass bei eurer Hilfe zahlreiche Leute ein kleine Spende tätigen. :)
Seit Einführung des PayPal-Buttons vor zwei Jahren wurden insgesamt 155EUR von fünf freundlichen Spendern gespendet. Der verbrauchte Kaffee war teurer :-?
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
sintec
Posts: 54
Joined: 2006-10-10 22:34
 

Re: mySQL Server Last

Post by sintec »

Sooo der mysql lief nun fast gute 24h. Hier die Ergebnisse..

Code: Select all

23m1015:~# ./tuning-primer.sh

        -- MYSQL PERFORMANCE TUNING PRIMER --
             - By: Matthew Montgomery -

MySQL Version 5.1.58-1~dotdeb.0 x86_64

Uptime = 0 days 23 hrs 44 min 44 sec
Avg. qps = 580
Total Questions = 49622769
Threads Connected = 9

Warning: Server has not been running for at least 48hrs.
It may not be safe to use these recommendations

To find out more information on how each of these
runtime variables effects performance visit:
http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html
Visit http://www.mysql.com/products/enterprise/advisors.html
for info about MySQL's Enterprise Monitoring and Advisory Service

SLOW QUERIES
The slow query log is NOT enabled.
Current long_query_time = 10.000000 sec.
You have 0 out of 49623090 that take longer than 10.000000 sec. to complete
Your long_query_time seems to be fine

BINARY UPDATE LOG
The binary update log is NOT enabled.
You will not be able to do point in time recovery
See http://dev.mysql.com/doc/refman/5.1/en/point-in-time-recovery.html

WORKER THREADS
Current thread_cache_size = 100
Current threads_cached = 47
Current threads_per_sec = 0
Historic threads_per_sec = 0
Your thread_cache_size is fine

MAX CONNECTIONS
Current max_connections = 100
Current threads_connected = 2
Historic max_used_connections = 48
The number of used connections is 48% of the configured maximum.
Your max_connections variable seems to be fine.

INNODB STATUS
Current InnoDB index space = 37 M
Current InnoDB data space = 39 M
Current InnoDB buffer pool free = 96 %
Current innodb_buffer_pool_size = 4.00 G
Depending on how much space your innodb indexes take up it may be safe
to increase this value to up to 2 / 3 of total system memory

MEMORY USAGE
Max Memory Ever Allocated : 4.43 G
Configured Max Per-thread Buffers : 262 M
Configured Max Global Buffers : 4.31 G
Configured Max Memory Limit : 4.56 G
Physical Memory : 7.81 G
Max memory limit seem to be within acceptable norms

KEY BUFFER
Current MyISAM index space = 293 K
Current key_buffer_size = 64 M
Key cache miss rate is 1 : 122
Key buffer free ratio = 81 %
Your key_buffer_size seems to be fine

QUERY CACHE
Query cache is enabled
Current query_cache_size = 128 M
Current query_cache_used = 3 M
Current query_cache_limit = 16 M
Current Query cache Memory fill ratio = 2.79 %
Current query_cache_min_res_unit = 512 K
Your query_cache_size seems to be too high.
Perhaps you can use these resources elsewhere
MySQL won't cache query results that are larger than query_cache_limit in size

SORT OPERATIONS
Current sort_buffer_size = 256 K
Current read_rnd_buffer_size = 256 K
Sort buffer seems to be fine

JOINS
Current join_buffer_size = 1.00 M
You have had 0 queries where a join could not use an index properly
Your joins seem to be using indexes properly

OPEN FILES LIMIT
Current open_files_limit = 2158 files
The open_files_limit should typically be set to at least 2x-3x
that of table_cache if you have heavy MyISAM usage.
Your open_files_limit value seems to be fine

TABLE CACHE
Current table_open_cache = 1024 tables
Current table_definition_cache = 256 tables
You have a total of 104 tables
You have 181 open tables.
The table_cache value seems to be fine

TEMP TABLES
Current max_heap_table_size = 16 M
Current tmp_table_size = 16 M
Of 9799316 temp tables, 0% were created on disk
Created disk tmp tables ratio seems fine

TABLE SCANS
Current read_buffer_size = 1 M
Current table scan ratio = 254 : 1
read_buffer_size seems to be fine

TABLE LOCKING
Current Lock Wait ratio = 0 : 49624684
Your table locking seems to be fine

Code: Select all

23m1015:~# ./mysqltuner.pl

 >>  MySQLTuner 1.2.0 - Major Hayden <major@mhtx.net>
 >>  Bug reports, feature requests, and downloads at http://mysqltuner.com/
 >>  Run with '--help' for additional options and output filtering

-------- General Statistics --------------------------------------------------
[--] Skipped version check for MySQLTuner script
[OK] Currently running supported MySQL version 5.1.58-1~dotdeb.0
[OK] Operating on 64-bit architecture

-------- Storage Engine Statistics -------------------------------------------
[--] Status: +Archive -BDB -Federated +InnoDB -ISAM -NDBCluster
[--] Data in MyISAM tables: 889K (Tables: 36)
[--] Data in InnoDB tables: 38M (Tables: 45)
[!!] Total fragmented tables: 47

-------- Security Recommendations  -------------------------------------------
[OK] All database users have passwords assigned

-------- Performance Metrics -------------------------------------------------
[--] Up for: 23h 46m 35s (49M q [580.678 qps], 7M conn, TX: 7B, RX: 13B)
[--] Reads / Writes: 72% / 28%
[--] Total buffers: 4.3G global + 2.6M per thread (100 max threads)
[OK] Maximum possible memory usage: 4.6G (58% of installed RAM)
[OK] Slow queries: 0% (0/49M)
[OK] Highest usage of available connections: 48% (48/100)
[OK] Key buffer size / total MyISAM indexes: 64.0M/285.0K
[OK] Key buffer hit rate: 99.2% (9K cached / 79 reads)
[OK] Query cache efficiency: 23.5% (4M cached / 21M selects)
[!!] Query cache prunes per day: 5201
[OK] Sorts requiring temporary tables: 0% (0 temp sorts / 9M sorts)
[OK] Temporary tables created on disk: 0% (293 on disk / 9M total)
[OK] Thread cache hit rate: 99% (49 created / 7M connections)
[OK] Table cache hit rate: 22% (181 open / 814 opened)
[OK] Open file limit used: 5% (118/2K)
[OK] Table locks acquired immediately: 100% (22M immediate / 22M locks)
[OK] InnoDB data size / buffer pool: 38.3M/4.0G

-------- Recommendations -----------------------------------------------------
General recommendations:
    Run OPTIMIZE TABLE to defragment tables for better performance
    MySQL started within last 24 hours - recommendations may be inaccurate
    Enable the slow query log to troubleshoot bad queries
Variables to adjust:
    query_cache_size (> 128M)
Sind noch Änderungen an der Konfiguration nötig?
Post Reply