breuchte am besten ne fertig optimierte config für mysql aber irgendwie wissen in den anderen Foren nichtmals was mein Problem ist=)
Also ich fang mal an... Wir betreiben mehrere Gameserver für Trackmania...
Dort wird ein programm namens Aseco verwendet damit werden alle Rekorde etc in mysql abgespeichert und es spielen durchschnittlich ca 150man auf den servern
"Aseco" verwendet unter anderem php dateien und somit halt viel mit mysql...
Eckdaten: AMD 2.6 ghz , 2gb ddr2 ram
Also hier einmal meine ausgabe aus der tuning-primer.sh
- Code: Select all
-- MYSQL PERFORMANCE TUNING PRIMER --
- By: Matthew Montgomery -
MySQL Version 5.0.51a-24+lenny2 x86_64
./tuning-primer.sh: line 407: bc: command not found
./tuning-primer.sh: line 408: bc: command not found
./tuning-primer.sh: line 409: bc: command not found
./tuning-primer.sh: line 410: bc: command not found
./tuning-primer.sh: line 411: bc: command not found
./tuning-primer.sh: line 412: bc: command not found
Uptime = days hrs min sec
Avg. qps = 21
Total Questions = 2915646
Threads Connected = 8
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.0/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 sec.
You have 0 out of 2915667 that take longer than 10 sec. to complete
Your long_query_time may be too high, I typically set this under 5 sec.
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.0/en/point-in-time-recovery.html
WORKER THREADS
Current thread_cache_size = 8
Current threads_cached = 1
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 = 8
Historic max_used_connections = 9
The number of used connections is 9% of the configured maximum.
You are using less than 10% of your configured max_connections.
Lowering max_connections could help to avoid an over-allocation of memory
See "MEMORY USAGE" section to make sure you are not over-allocating
MEMORY USAGE
./tuning-primer.sh: line 1226: bc: command not found
./tuning-primer.sh: line 1227: bc: command not found
./tuning-primer.sh: line 1251: bc: command not found
./tuning-primer.sh: line 1254: bc: command not found
./tuning-primer.sh: line 1255: bc: command not found
./tuning-primer.sh: line 1257: bc: command not found
./tuning-primer.sh: line 1259: [: -gt: unary operator expected
./tuning-primer.sh: line 369: [: max_memoryHR: integer expression expected
./tuning-primer.sh: line 375: [: max_memoryHR: integer expression expected
./tuning-primer.sh: line 381: [: max_memoryHR: integer expression expected
./tuning-primer.sh: line 388: export: `=max_memoryHR': not a valid identifier
Max Memory Ever Allocated : bytes
./tuning-primer.sh: line 369: [: per_thread_buffersHR: integer expression expected
./tuning-primer.sh: line 375: [: per_thread_buffersHR: integer expression expected
./tuning-primer.sh: line 381: [: per_thread_buffersHR: integer expression expected
./tuning-primer.sh: line 388: export: `=per_thread_buffersHR': not a valid identifier
Configured Max Per-thread Buffers : bytes
./tuning-primer.sh: line 369: [: global_buffersHR: integer expression expected
./tuning-primer.sh: line 375: [: global_buffersHR: integer expression expected
./tuning-primer.sh: line 381: [: global_buffersHR: integer expression expected
./tuning-primer.sh: line 388: export: `=global_buffersHR': not a valid identifier
Configured Max Global Buffers : bytes
./tuning-primer.sh: line 369: [: total_memoryHR: integer expression expected
./tuning-primer.sh: line 375: [: total_memoryHR: integer expression expected
./tuning-primer.sh: line 381: [: total_memoryHR: integer expression expected
./tuning-primer.sh: line 388: export: `=total_memoryHR': not a valid identifier
Configured Max Memory Limit : bytes
./tuning-primer.sh: line 350: bc: command not found
Physical Memory : G
Max memory limit seem to be within acceptable norms
KEY BUFFER
./tuning-primer.sh: line 668: bc: command not found
./tuning-primer.sh: line 669: bc: command not found
./tuning-primer.sh: line 350: bc: command not found
Current MyISAM index space = M
./tuning-primer.sh: line 350: bc: command not found
Current key_buffer_size = M
Key cache miss rate is 1 : 3700
Key buffer free ratio = %
./tuning-primer.sh: line 706: [: -le: unary operator expected
./tuning-primer.sh: line 710: [: -le: unary operator expected
Your key_buffer_size seems to be fine
QUERY CACHE
./tuning-primer.sh: line 741: bc: command not found
./tuning-primer.sh: line 742: bc: command not found
Query cache is enabled
./tuning-primer.sh: line 350: bc: command not found
Current query_cache_size = M
./tuning-primer.sh: line 350: bc: command not found
Current query_cache_used = M
./tuning-primer.sh: line 350: bc: command not found
Current query_cache_limit = M
Current Query cache Memory fill ratio = %
./tuning-primer.sh: line 350: bc: command not found
Current query_cache_min_res_unit = K
./tuning-primer.sh: line 755: bc: command not found
./tuning-primer.sh: line 756: bc: command not found
./tuning-primer.sh: line 757: [: -gt: unary operator expected
./tuning-primer.sh: line 764: [: -le: unary operator expected
MySQL won't cache query results that are larger than query_cache_limit in size
SORT OPERATIONS
./tuning-primer.sh: line 350: bc: command not found
Current sort_buffer_size = M
./tuning-primer.sh: line 350: bc: command not found
Current read_rnd_buffer_size = K
Sort buffer seems to be fine
JOINS
./tuning-primer.sh: line 350: bc: command not found
Current join_buffer_size = K
You have had 34080 queries where a join could not use an index properly
You should enable "log-queries-not-using-indexes"
Then look for non indexed joins in the slow query log.
If you are unable to optimize your queries you may want to increase your
join_buffer_size to accommodate larger joins in one pass.
Note! This script will still suggest raising the join_buffer_size when
ANY joins not using indexes are found.
OPEN FILES LIMIT
Current open_files_limit = 1024 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_cache value = 64 tables
You have a total of 266 tables
You have 64 open tables.
Current table_cache hit rate is 2%, while 100% of your table cache is in use
You should probably increase your table_cache
TEMP TABLES
./tuning-primer.sh: line 350: bc: command not found
Current max_heap_table_size = M
./tuning-primer.sh: line 350: bc: command not found
Current tmp_table_size = M
Of 4733 temp tables, 27% were created on disk
Effective in-memory tmp_table_size is limited to max_heap_table_size.
Perhaps you should increase your tmp_table_size and/or max_heap_table_size
to reduce the number of disk-based temporary tables
Note! BLOB and TEXT columns are not allow in memory tables.
If you are using these columns raising these values might not impact your
ratio of on disk temp tables.
TABLE SCANS
./tuning-primer.sh: line 350: bc: command not found
Current read_buffer_size = K
Current table scan ratio = 22165 : 1
You have a high ratio of sequential access requests to SELECTs
You may benefit from raising read_buffer_size and/or improving your use of indexes.
TABLE LOCKING
Current Lock Wait ratio = 1 : 2010
You may benefit from selective use of InnoDB.
If you have long running SELECT's against MyISAM tables and perform
frequent updates consider setting 'low_priority_updates=1'
If you have a high concurrency of inserts on Dynamic row-length tables
consider setting 'concurrent_insert=2'.
Verstehen tuh ich da nicht viel raus vorallem sehr oft "command not found"
Und hier mal meine 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 192.168.1.1
#
# * Fine Tuning
#
key_buffer = 16M
max_allowed_packet = 16M
thread_stack = 128K
thread_cache_size = 8
#max_connections = 100
#table_cache = 64
#thread_concurrency = 10
#
# * Query Cache Configuration
#
query_cache_limit = 1M
query_cache_size = 16M
#
# * 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
#log_slow_queries = /var/log/mysql/mysql-slow.log
#long_query_time = 2
#log-queries-not-using-indexes
#
# 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
#
# 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
innodb_thread_concurrency = 8
innodb_buffer_pool_size = 1G
innodb_additional_mem_pool_size = 20M
innodb_data_home_dir = /var/lib/mysql
innodb_log_arch_dir = /var/lib/mysql
innodb_log_group_home_dir = /var/lib/mysql
innodb_data_file_path = ibdata1:2000M;ibdata2:10M:autoextend
innodb_log_file_size = 100M
innodb_log_buffer_size = 8M
innodb_log_files_in_group = 2
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50
#
# * 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!
#
!includedir /etc/mysql/conf.d/
Is halt die standart cnf.. muss dazu sagen ich arbeite normal nicht mit datenbanken etc....
Mein gebiet sind eher auf gameserver =)
Hoffe unter euch is ein Spezialist der mir paar befehle sagen könnte die ich hinzufügen oder ändern könnte...
Vielleicht hat sogar jemand eine perfekt abgestimmte my.cnf würd mich sehr freuen =)
Gruß
Tyjo