MySQL Performance Tuning mit Tuning-Primer.sh Script

Da Dein Server bei diesen Zahlen noch nicht explodiert ist, tippe ich mal darauf, daß Du einen MPM-Worker hast, oder?
Wäre zumindest wichtig zu wissen.

huschi.
 
Code:
root@ks301036:/etc/apache2# dpkg -l | grep mpm
ii  apache2-mpm-prefork               2.2.3-4+etch5                            Traditional model for Apache HTTPD 2.1

Sieht nach Prefork aus :)
 
Tja, dann muß ich einfach sagen:
Dein Server ist zu klein für diese Konfiguration.

Fangen wir bei den einfachen Sachen an:
Gut programmierte Scripte brauchen nur eine MySQL-Verbindung pro Apache-Server. D.h. daß Du bei maximal 150 Apache-Prozessen auch nur maximal 150 MySQL-Connections brauchst. Du hast aber 1000 eingestellt. Hier wird also durch die Bereitstellung der überflüssigen Connections bereits etwas Speicher verbraten.

Dennoch hast Du laut den Analyse-Scripten über 380 Connections zur selben Zeit gehabt. Entweder starten hier viele Cronjobs oder ähnliches, oder die Scripte sind einfach schlecht.

Naja, dazu die üblichen Einstellungen bzgl. dem MySQL-Speicherverbrauch. Denn 2.6GByte sind über das 10fache von dem, was Du wirklich zur Verfügung hast.
Aber eigentlich hast Du auch beim Apache mit 150 MaxClients schon zuviel Verbrauch. Ein Prefork-Child braucht einiges an Ram. Man sagt so ca. 12 MB. Ergo bei voller Auslastung: 150 x 12 MB = 1800 MB.

Ich weiß ja nicht, wie sich Dein Server bisher verhalten hat. Aber falls er regelmäßig abschmiert, steht hier der Grund dafür. ;)

huschi.
 
Ok,

die max mysql connections habe ich mal runtergedreht auf 400 und gehe dann noch auf 300 runter wenn alles gut läuft.
An einem Script habe ich auch nochmal was geändert was viele mysql aufrufe getätigt hat.

Gibts sonst noch irgendwelche Einstellungen die ich ändern sollte bezüglich key buffer und so von mysql?
Oder von Apache mit start servers und so?

Gruß Simon
 
Wie bereits schon mehrfach ausgeführt ist Dein vorhandener RAM einfach zu klein für diese Konfiguration. Damit hast Du keinen wesentlichen Spielraum zum tuning. Das "optimieren" fällt in diesem Fall in Richtung "sowenig RAM wie möglich verbrauchen" aus.

Aber irgendwie stößt das auf taube Ohren...

Evtl. hast Du ja auch schon Verdachtsmomente gehabt, wo der Server nicht oder nur schwer zu erreichen war. Aber sowas wissen wir hier alles nicht.

huschi.
 
Intel(R) Celeron(R) CPU 2.66GHz
Ram: 256 MB

Wenn der RAM ausgeht kommt es zu Fehlermeldungen und Störungen bis hin zum Absturz der Maschine.

Daher sollte man den RAM Verbrauch von Apache, MySQL ect. durch richtige Konfiguration begrenzen!

Linux, Mailserver und Apache benötigen im Leerlauf ~ 50 MB RAM. Jede Verbindung zum Webserver (Apache) benötigt ~ 12 MB RAM. Hat man noch Plesk, Dr. Web, Spamassassin, Bind ect. am laufen ist der Verbrauch im Leerlauf natürlich höher als ~ 50 MB.

250 MB RAM - 50 MB Ram sind 150 MB RAM welche für Verbindungen (Apache httpd2 Prozesse) und MySQL zur Verfügung stehen.

12 MB pro Verbindung mal 10 = 120 MB RAM. Von den 150 MB wären dann noch ~ 30 MB für MySQL übrig.

Zusammenfassung RAM:

250 MB (gesamt)
davon ~ 50 MB (Linux, Apache)
davon ~ 120 MB (10 Apache httpd2 Verbindungen)
davon ~ 30 MB (MySQL)

Apache sollte nun so konfiguriert werden, daß nicht mehr wie 10 gleichzeitge Verbindungen möglich sind. Und MySQL sollte so konfiguriert werden, daß MySQL nicht mehr wie ~ 30 MB RAM verbraucht.

Konfiguriert man MySQL nicht hinsichtlich RAM Verbrauch, lagert MySQL auf Festplatte aus (Swap) und die CPU wird wegen dem ständigen Lesen u. Schreiben auf die Festplatte überlastet.

Alle Werte sind Beispielswerte und können von Server zu Server variieren!

Anleitung MySQL u. Apache Performance Tuning

Apache2.conf
Code:
Timeout 100
KeepAlive [COLOR="Red"]On[/COLOR]
MaxKeepAliveRequests 100
KeepAliveTimeout [COLOR="Red"]2[/COLOR]

StartServers [COLOR="Red"]1[/COLOR]
MinSpareServers [COLOR="Red"]1[/COLOR]
MaxSpareServers [COLOR="Red"]2[/COLOR]
ServerLimit [COLOR="Red"]15[/COLOR]
MaxClients [COLOR="Red"]15[/COLOR]
MaxRequestsPerChild [COLOR="Red"]4000[/COLOR]

my.cnf
Code:
[mysqld]

key_buffer = 8M
net_buffer_length = 1K

sort_buffer_size = 32K
myisam_sort_buffer_size = 32K
read_buffer_size = 32K
read_rnd_buffer_size = 32K
join_buffer_size = 1M

query_cache_size = 2M
thread_cache = 8
table_cache = 512
max_allowed_packet = 256K

max_connections = 15
low_priority_updates = 1
long_query_time = 2

top
Code:
Tasks:  [COLOR="Red"]90[/COLOR] total,   3 running,  [COLOR="Red"]87[/COLOR] sleeping,   0 stopped,   0 zombie
die Anzahl an Prozessen veringert sich automatisch bei einem KeepAliveTimeout = 2


Code:
Cpu(s):  7.7%us,  8.0%sy,  0.0%ni, 20.0%id, [COLOR="Red"]52.7%wa[/COLOR],  3.0%hi,  8.7%si,  0.0%s
52,7% der Zeit ist die CPU mit Lesen + Scheiben auf die Festplatte beschäftigt. Daher auch die 80 MB Swap Datei auf der Festplatte. Ursache könnte MySQL sein.

tuning-primer.sh
Code:
Configured Max Memory Limit : [COLOR="Red"]25 M[/COLOR]

Max Memory Limit sollte etwa 25 MB sein. Werte für Buffers möglichst klein machen!
 
Last edited by a moderator:
Hallo zusammen,

ich hab hier mal meine Tuning-Primer Auswertung. Vielleicht kann mir ja jemand dabei helfen? Allerdings scheint Tuning Primer nicht alles auswerten zu können.

Hier mal die Auswertung:

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

MySQL Version 5.0.32-Debian_7etch6-log i486

/usr/bin/tuning-primer.sh: line 389: bc: command not found
/usr/bin/tuning-primer.sh: line 390: bc: command not found
/usr/bin/tuning-primer.sh: line 391: bc: command not found
/usr/bin/tuning-primer.sh: line 392: bc: command not found
/usr/bin/tuning-primer.sh: line 393: bc: command not found
/usr/bin/tuning-primer.sh: line 394: bc: command not found
Uptime =  days  hrs  min  sec
Avg. qps = 8
Total Questions = 6739479
Threads Connected = 1

Server has been running for over 48hrs.
It should be safe to follow 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 enabled.
Current long_query_time = 3 sec.
You have 169007 out of 6739500 that take longer than 3 sec. to complete
Your long_query_time seems to be fine

BINARY UPDATE LOG
The binary update log is enabled

WORKER THREADS
Current thread_cache_size = 8
Current threads_cached = 7
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 = 1
Historic max_used_connections = 24
The number of used connections is 24% of the configured maximum.
Your max_connections variable seems to be fine.

MEMORY USAGE
/usr/bin/tuning-primer.sh: line 1205: bc: command not found
/usr/bin/tuning-primer.sh: line 1206: bc: command not found
/usr/bin/tuning-primer.sh: line 1230: bc: command not found
/usr/bin/tuning-primer.sh: line 1233: bc: command not found
/usr/bin/tuning-primer.sh: line 1234: bc: command not found
/usr/bin/tuning-primer.sh: line 1236: bc: command not found
/usr/bin/tuning-primer.sh: line 1238: [: -gt: unary operator expected
/usr/bin/tuning-primer.sh: line 351: [: max_memoryHR: integer expression expected
/usr/bin/tuning-primer.sh: line 357: [: max_memoryHR: integer expression expected
/usr/bin/tuning-primer.sh: line 363: [: max_memoryHR: integer expression expected
/usr/bin/tuning-primer.sh: line 370: export: `0=max_memoryHR': not a valid identifier
Max Memory Ever Allocated :  bytes
/usr/bin/tuning-primer.sh: line 351: [: per_thread_buffersHR: integer expression expected
/usr/bin/tuning-primer.sh: line 357: [: per_thread_buffersHR: integer expression expected
/usr/bin/tuning-primer.sh: line 363: [: per_thread_buffersHR: integer expression expected
/usr/bin/tuning-primer.sh: line 370: export: `0=per_thread_buffersHR': not a valid identifier
Configured Max Per-thread Buffers :  bytes
/usr/bin/tuning-primer.sh: line 351: [: global_buffersHR: integer expression expected
/usr/bin/tuning-primer.sh: line 357: [: global_buffersHR: integer expression expected
/usr/bin/tuning-primer.sh: line 363: [: global_buffersHR: integer expression expected
/usr/bin/tuning-primer.sh: line 370: export: `0=global_buffersHR': not a valid identifier
Configured Max Global Buffers :  bytes
/usr/bin/tuning-primer.sh: line 351: [: total_memoryHR: integer expression expected
/usr/bin/tuning-primer.sh: line 357: [: total_memoryHR: integer expression expected
/usr/bin/tuning-primer.sh: line 363: [: total_memoryHR: integer expression expected
/usr/bin/tuning-primer.sh: line 370: export: `0=total_memoryHR': not a valid identifier
Configured Max Memory Limit :  bytes
/usr/bin/tuning-primer.sh: line 332: bc: command not found
Physical Memory :  M
Max memory limit seem to be within acceptable norms

KEY BUFFER
/usr/bin/tuning-primer.sh: line 332: bc: command not found
/usr/bin/tuning-primer.sh: line 647: bc: command not found
/usr/bin/tuning-primer.sh: line 648: bc: command not found
/usr/bin/tuning-primer.sh: line 332: bc: command not found
Current MyISAM index space =  M
/usr/bin/tuning-primer.sh: line 332: bc: command not found
Current key_buffer_size =  M
Key cache miss rate is 1 : 681
Key buffer fill ratio =  %
/usr/bin/tuning-primer.sh: line 685: [: -ge: unary operator expected
/usr/bin/tuning-primer.sh: line 689: [: -le: unary operator expected
Your key_buffer_size seems to be fine

QUERY CACHE
/usr/bin/tuning-primer.sh: line 720: bc: command not found
/usr/bin/tuning-primer.sh: line 721: bc: command not found
Query cache is enabled
/usr/bin/tuning-primer.sh: line 332: bc: command not found
Current query_cache_size =  M
/usr/bin/tuning-primer.sh: line 332: bc: command not found
Current query_cache_used =  M
/usr/bin/tuning-primer.sh: line 332: bc: command not found
Current query_cache_limit =  M
Current Query cache Memory fill ratio =  %
/usr/bin/tuning-primer.sh: line 332: bc: command not found
Current query_cache_min_res_unit =  K
/usr/bin/tuning-primer.sh: line 734: bc: command not found
/usr/bin/tuning-primer.sh: line 735: bc: command not found
/usr/bin/tuning-primer.sh: line 736: [: -gt: unary operator expected
/usr/bin/tuning-primer.sh: line 743: [: -le: unary operator expected
/usr/bin/tuning-primer.sh: line 747: [: -ge: unary operator expected
MySQL won't cache query results that are larger than query_cache_limit in size

SORT OPERATIONS
/usr/bin/tuning-primer.sh: line 332: bc: command not found
Current sort_buffer_size =  M
/usr/bin/tuning-primer.sh: line 332: bc: command not found
Current read_rnd_buffer_size =  K
Sort buffer seems to be fine

JOINS
/usr/bin/tuning-primer.sh: line 332: bc: command not found
Current join_buffer_size =  K
You have had 369 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 745 tables
You have 64 open tables.
Current table_cache hit rate is 0%, while 100% of your table cache is in use
You should probably increase your table_cache

TEMP TABLES
/usr/bin/tuning-primer.sh: line 332: bc: command not found
Current max_heap_table_size =  M
/usr/bin/tuning-primer.sh: line 332: bc: command not found
Current tmp_table_size =  M
Of 173269 temp tables, 89% 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
/usr/bin/tuning-primer.sh: line 332: bc: command not found
Current read_buffer_size =  K
Current table scan ratio = 36 : 1
read_buffer_size seems to be fine

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

System: Debian - Etch - AMD Athlon 64 3700+ - 1 GB Ram

Vielleicht habt ihr ja ein paar Tipps für mich parat? Installiert ist das ISPCP System RC3 und minimales Debian Etch.
 
teste mal, my.cnf
Code:
[mysqld]

key_buffer = 18M
net_buffer_length = 8K

sort_buffer_size = 128K
myisam_sort_buffer_size = 128K
read_buffer_size = 128K
read_rnd_buffer_size = 128K
join_buffer_size = 4M

query_cache_size = 8M
thread_cache = 12
table_cache = 1024
max_allowed_packet = 512K

max_connections = 50
low_priority_updates = 1
long_query_time = 2

Apppach2.conf
Code:
KeepAlive On
MaxKeepAliveRequests 150
KeepAliveTimeout 2



<IfModule prefork.c>
StartServers       1
MinSpareServers    2
MaxSpareServers    5
ServerLimit       50
MaxClients        50
MaxRequestsPerChild  4000
<IfModule>
 
Last edited by a moderator:
So, auf Grund des nicht ausreichenden RAMs habe ich mir nun
einen neuen Server gemietet.

1,2GHZ
RAM: 1GB
250GB Festplatte.

Top Auskunft:
Code:
Tasks: 103 total,   2 running, 100 sleeping,   0 stopped,   1 zombie
Cpu(s):  1.3%us,  1.7%sy,  0.0%ni, 96.7%id,  0.0%wa,  0.0%hi,  0.3%si,  0.0%st
Mem:   1015896k total,   343320k used,   672576k free,    22560k buffers
Swap: 10241428k total,        0k used, 10241428k free,   191400k cached

Ich habe nun das Problem, das bei ungefähr 140 MySql Verbindungen in phpmyadmin unter Prozesse immer steht: Time: Connect, Info: Reading from net
Danach wird der Server der drauf zugreifen will auf die DB (sind 2 getrennte Server) blockiert und ich muss immer erst flush-hosts oder wie das heisst ausführen. Desweiteren werden die Verbindungen die fehlgeschlagen sind als Fehlgeschlagen angezeigt.

Hier meine mysql config:

my.cnf
Code:
key_buffer              = 384
max_allowed_packet      = 16M
thread_stack            = 128K
thread_cache_size       = 8
max_connections        = 400
table_cache            = 512
query_cache_limit       = 1M
query_cache_size        = 4M
 
Time: Connect, Info: Reading from net
Da versucht sich jemand von Ausserhalb einzuloggen aber mit falschen User/PW.
Und statt danach sauber zu disconnecten bleibt die Verbindung aufrechte, bis Dein MySQL einen Timeout bringt.

Wenn es von Deinem zweiten Server kommt, dann solltest Du die Daten mal prüfen.

huschi.
 
MOD: Full-Quote entfernt!

Mh, nein das kann nicht sein.
Der Fehler kommt immer erst, nachdem eine bestimmte Anzahl von Verbindungen unter Prozesse auftaucht. Sagen wir ~140
Danach kommen diese Fehler.
 
Last edited by a moderator:
Hi für alle die diese Ausgabe nach dem Herunterladen des Script bekommen:

In Google findet man dazu keine Antwort, zumindest habe ich nichts gefunden.

Code:
- INITIAL LOGIN ATTEMPT FAILED -

Testing Stored  for passwords:-RETRY LOGIN ATTEMPT FAILD -

Could not auto detect login info!

Dou you have your login handy ? [y/N] : 
User: 
password:
Would you like me to create a /.my.cnf file for you? [y/N] : 
- FINAL LOGIN ATTEMPT FAILD -

Irgendwie klappte es mit der Automatischem Loggin nicht, wieso ist mir auch nicht bekannt.

Den Username und das Passwort (DB) kann man aus der root/confixx/confixx_main.conf entnehmen und dann klappt das Automatische Logging wieder.

Den Rest einfach mit ja beantworten.

gruss Gero
 
Last edited by a moderator:
Was ist mir zu empfehlen?

AMD Athlon(tm) 64 X2 Dual Core Processor 3400+ (1808 MHz) 1GB Ram

Und vor allen Dingen finde ich in meiner my.cf nicht alles was er vorschlägt.

ZB: SLOW QUERIES
The slow query log is NOT enabled.
Current long_query_time = 10 sec.
You have 10 out of 85043 that take longer than 10 sec. to complete
Your long_query_time may be too high, I typically set this under 5 sec.

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

MySQL Version 5.0.45 i686

Uptime = 0 days 5 hrs 21 min 40 sec
Avg. qps = 4
Total Questions = 85022
Threads Connected = 1

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 10 out of 85043 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 = 0
Current threads_cached = 0
Current threads_per_sec = 2
Historic threads_per_sec = 0
Threads created per/sec are overrunning threads cached
You should raise thread_cache_size

MAX CONNECTIONS
Current max_connections = 400
Current threads_connected = 1
Historic max_used_connections = 13
The number of used connections is 3% 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
Max Memory Ever Allocated : 104 M
Configured Max Per-thread Buffers : 2 G
Configured Max Global Buffers : 26 M
Configured Max Memory Limit : 2 G
Physical Memory : 994.63 M

Max memory limit exceeds 90% of physical memory

KEY BUFFER
Current MyISAM index space = 168 M
Current key_buffer_size = 16 M
Key cache miss rate is 1 : 1786
Key buffer fill ratio = 100.00 %
You could increase key_buffer_size
It is safe to raise this up to 1/4 of total system memory;
assuming this is a dedicated database server.

QUERY CACHE
Query cache is supported but not enabled
Perhaps you should set the query_cache_size

SORT OPERATIONS
Current sort_buffer_size = 5 M
Current read_rnd_buffer_size = 508 K
Sort buffer seems to be fine

JOINS
Current join_buffer_size = 132.00 K
You have had 232 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 = 2000 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 = 512 tables
You have a total of 349 tables
You have 431 open tables.
The table_cache value seems to be fine

TEMP TABLES
Current max_heap_table_size = 16 M
Current tmp_table_size = 32 M
Of 5222 temp tables, 14% were created on disk
Effective in-memory tmp_table_size is limited to max_heap_table_size.
Created disk tmp tables ratio seems fine

TABLE SCANS
Current read_buffer_size = 252 K
Current table scan ratio = 8213 : 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 : 204
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'.

Code:
# Example MySQL config file for medium systems.
#
# This is for a system with little memory (32M - 64M) where MySQL plays
# an important part, or systems up to 128M where MySQL is used together with
# other programs (such as a web server)
#
# You can copy this file to
# /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is /var/lib/mysql) or
# ~/.my.cnf to set user-specific options.
#
# In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
# with the "--help" option.

# The following options will be passed to all MySQL clients
[client]
#password	= your_password
port		= 3306
socket		= /var/lib/mysql/mysql.sock

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
port = 3306
socket = /var/lib/mysql/mysql.sock
skip-locking
key_buffer = 16M
max_allowed_packet = 1M
table_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M

# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (via the "enable-named-pipe" option) will render mysqld useless!
# 
#skip-networking

# Replication Master Server (default)
# binary logging is required for replication
# log-bin=mysql-bin

# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set
# but will not function as a master if omitted
server-id	= 1
set-variable = myisam_sort_buffer_size=32
set-variable = sort_buffer=5M
set-variable = max_connections=100
set-variable = key_buffer=16M
set-variable = table_cache=512

# Replication Slave (comment out master section to use this)
#
# To configure this host as a replication slave, you can choose between
# two methods :
#
# 1) Use the CHANGE MASTER TO command (fully described in our manual) -
#    the syntax is:
#
#    CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
#    MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
#
#    where you replace <host>, <user>, <password> by quoted strings and
#    <port> by the master's port number (3306 by default).
#
#    Example:
#
#    CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
#    MASTER_USER='joe', MASTER_PASSWORD='secret';
#
# OR
#
# 2) Set the variables below. However, in case you choose this method, then
#    start replication for the first time (even unsuccessfully, for example
#    if you mistyped the password in master-password and the slave fails to
#    connect), the slave will create a master.info file, and any later
#    change in this file to the variables' values below will be ignored and
#    overridden by the content of the master.info file, unless you shutdown
#    the slave server, delete master.info and restart the slaver server.
#    For that reason, you may want to leave the lines below untouched
#    (commented) and instead use CHANGE MASTER TO (see above)
#
# required unique id between 2 and 2^32 - 1
# (and different from the master)
# defaults to 2 if master-host is set
# but will not function as a slave if omitted
#server-id       = 2
#
# The replication master for this slave - required
#master-host     =   <hostname>
#
# The username the slave will use for authentication when connecting
# to the master - required
#master-user     =   <username>
#
# The password the slave will authenticate with when connecting to
# the master - required
#master-password =   <password>
#
# The port the master is listening on.
# optional - defaults to 3306
#master-port     =  <port>
#
# binary logging - not required for slaves, but recommended
#log-bin=mysql-bin

# Point the following paths to different dedicated disks
#tmpdir		= /tmp/		
#log-update 	= /path-to-dedicated-directory/hostname

# Uncomment the following if you are using BDB tables
#bdb_cache_size = 4M
#bdb_max_lock = 10000

# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir = /var/lib/mysql/
#innodb_data_file_path = ibdata1:10M:autoextend
#innodb_log_group_home_dir = /var/lib/mysql/
#innodb_log_arch_dir = /var/lib/mysql/
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
#innodb_buffer_pool_size = 16M
#innodb_additional_mem_pool_size = 2M
# Set .._log_file_size to 25 % of buffer pool size
#innodb_log_file_size = 5M
#innodb_log_buffer_size = 8M
#innodb_flush_log_at_trx_commit = 1
#innodb_lock_wait_timeout = 50

# The safe_mysqld script
[safe_mysqld]
err-log=/var/lib/mysql/mysqld.log

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates

[isamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout
 
finde ich in meiner my.cf nicht alles was er vorschlägt.
Dann mußt Du es anlegen.

Uptime = 0 days 5 hrs 21 min 40 sec
...
Warning: Server has not been running for at least 48hrs.
Das hast Du aber gelesen, oder?

Current max_connections = 400
Historic max_used_connections = 13
The number of used connections is 3% of the configured maximum.
Und das auch?

Max memory limit exceeds 90% of physical memory
Und das?
...

huschi.
 
Back
Top