Datenbank-Auslastung!
Datenbank-Auslastung!
Servus,
kann mir jemand sagen, warum meine Datenbank bei einer Useranzahl zwischen 100-120 keine Verbindung mehr macht.
Ich habe auf meine Homepage über 100 User gleichzeitig online, aber es kann das keine Verbindung mit der Datenbank bei noch mehr Usern hergestellt werden!
Woran liegt es? Gibt es eine Einstellung?
Thx DIGIMan
kann mir jemand sagen, warum meine Datenbank bei einer Useranzahl zwischen 100-120 keine Verbindung mehr macht.
Ich habe auf meine Homepage über 100 User gleichzeitig online, aber es kann das keine Verbindung mit der Datenbank bei noch mehr Usern hergestellt werden!
Woran liegt es? Gibt es eine Einstellung?
Thx DIGIMan
-
- Posts: 1117
- Joined: 2002-09-27 00:54
- Location: Hannover
- Contact:
Re: Datenbank-Auslastung!
Ohne weitere Beschreibung von Hardware und eingesetzter Software Auszügen aus den config Dateien: An 1000000 Dingen!
Angaben
Ich habe einen 1&1 Linux Suse Server 8.1 mit Mysql.
Welche Config Datei wird genötigt und wo finde ich sie?
Bei der HArdware, kann ich nicht viel sagen, weis nicht ob ich schon Intel Celeron 2.000 MHz- Prozessor mit 256 MB DDR-RAM habe, glaube schon, da der Server erst seit Januar 2003 existiert!
Sorry, ich kenne mich mit der Thematik leider nicht besonders aus, deshalb bin ich über jede Hilfe Dankbar.
Thx DIGIMan
Welche Config Datei wird genötigt und wo finde ich sie?
Bei der HArdware, kann ich nicht viel sagen, weis nicht ob ich schon Intel Celeron 2.000 MHz- Prozessor mit 256 MB DDR-RAM habe, glaube schon, da der Server erst seit Januar 2003 existiert!
Sorry, ich kenne mich mit der Thematik leider nicht besonders aus, deshalb bin ich über jede Hilfe Dankbar.
Thx DIGIMan
-
- Posts: 1117
- Joined: 2002-09-27 00:54
- Location: Hannover
- Contact:
Re: Datenbank-Auslastung!
Ok,
/etc/mysql.conf
Als mysql Benutzer einloggen und dann status eingeben
Also zB.:
bash> mysql -u admin -p
mysql> status
und die letzte Zeile (zB. Threads: 9 Questions: 1047564 Slow queries: 0 Opens: 70 Flush tables: 1 Open tables: 64 Queries per second avg: 71.820) posten.
Dann noch:
free;cat /proc/loadavg
/etc/mysql.conf
Als mysql Benutzer einloggen und dann status eingeben
Also zB.:
bash> mysql -u admin -p
mysql> status
und die letzte Zeile (zB. Threads: 9 Questions: 1047564 Slow queries: 0 Opens: 70 Flush tables: 1 Open tables: 64 Queries per second avg: 71.820) posten.
Dann noch:
free;cat /proc/loadavg
Posten:
Hier erstmal der Status:
Threads: 38 Questions: 6327880 Slow queries: 1865 Opens: 43085 Flush tables: 1 Open tables: 64 Queries per second avg: 15.302
Was soll ich denn mit free;cat /proc/loadavg machen???
Es gibt leider keine mysql.conf in dem /etc/ Verzeichnis nur eine my.conf
Gruß DIGIMan
Threads: 38 Questions: 6327880 Slow queries: 1865 Opens: 43085 Flush tables: 1 Open tables: 64 Queries per second avg: 15.302
Was soll ich denn mit free;cat /proc/loadavg machen???
Es gibt leider keine mysql.conf in dem /etc/ Verzeichnis nur eine my.conf
Gruß DIGIMan
-
- Posts: 1117
- Joined: 2002-09-27 00:54
- Location: Hannover
- Contact:
Re: Datenbank-Auslastung!
Jo, my.conf meine ich :oops:
Die Zeile so eingeben (geht auch als nicht root)
Die Zeile so eingeben (geht auch als nicht root)
Infos:
So hier erstmal die my.conf:___________________________
#
# One can in this file use all long options that the program supports.
# If you want to know which options a program support, run the program
# with --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
#skip-networking
set-variable = key_buffer=16M
set-variable = max_allowed_packet=1M
set-variable = table_cache=64
set-variable = sort_buffer=512K
set-variable = net_buffer_length=8K
set-variable = myisam_sort_buffer_size=8M
log-bin
server-id = 1
# 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
#set-variable = bdb_cache_size=4M
#set-variable = 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
#set-variable = innodb_buffer_pool_size=16M
#set-variable = innodb_additional_mem_pool_size=2M
# Set .._log_file_size to 25 % of buffer pool size
#set-variable = innodb_log_file_size=5M
#set-variable = innodb_log_buffer_size=8M
#innodb_flush_log_at_trx_commit=1
#set-variable = innodb_lock_wait_timeout=50
# The safe_mysqld script
[safe_mysqld]
err-log=/var/lib/mysql/mysqld.log
[mysqldump]
quick
set-variable = max_allowed_packet=16M
[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates
[isamchk]
set-variable = key_buffer=20M
set-variable = sort_buffer=20M
set-variable = read_buffer=2M
set-variable = write_buffer=2M
[myisamchk]
set-variable = key_buffer=20M
set-variable = sort_buffer=20M
set-variable = read_buffer=2M
set-variable = write_buffer=2M
[mysqlhotcopy]
interactive-timeout
____________________________________________________________
Und nun die andere Sache:______________________
total used free shared buffers cached
Mem: 248508 240260 8248 0 6892 160968
-/+ buffers/cache: 72400 176108
Swap: 265064 52328 212736
0.19 0.43 0.49 1/124 25549
Thx DIGIMan
#
# One can in this file use all long options that the program supports.
# If you want to know which options a program support, run the program
# with --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
#skip-networking
set-variable = key_buffer=16M
set-variable = max_allowed_packet=1M
set-variable = table_cache=64
set-variable = sort_buffer=512K
set-variable = net_buffer_length=8K
set-variable = myisam_sort_buffer_size=8M
log-bin
server-id = 1
# 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
#set-variable = bdb_cache_size=4M
#set-variable = 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
#set-variable = innodb_buffer_pool_size=16M
#set-variable = innodb_additional_mem_pool_size=2M
# Set .._log_file_size to 25 % of buffer pool size
#set-variable = innodb_log_file_size=5M
#set-variable = innodb_log_buffer_size=8M
#innodb_flush_log_at_trx_commit=1
#set-variable = innodb_lock_wait_timeout=50
# The safe_mysqld script
[safe_mysqld]
err-log=/var/lib/mysql/mysqld.log
[mysqldump]
quick
set-variable = max_allowed_packet=16M
[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates
[isamchk]
set-variable = key_buffer=20M
set-variable = sort_buffer=20M
set-variable = read_buffer=2M
set-variable = write_buffer=2M
[myisamchk]
set-variable = key_buffer=20M
set-variable = sort_buffer=20M
set-variable = read_buffer=2M
set-variable = write_buffer=2M
[mysqlhotcopy]
interactive-timeout
____________________________________________________________
Und nun die andere Sache:______________________
total used free shared buffers cached
Mem: 248508 240260 8248 0 6892 160968
-/+ buffers/cache: 72400 176108
Swap: 265064 52328 212736
0.19 0.43 0.49 1/124 25549
Thx DIGIMan
-
- Userprojekt
- Posts: 7066
- Joined: 2002-10-09 14:30
- Location: Dorsten
- Contact:
Re: Datenbank-Auslastung!
Schau dir mal mtop an, ist bei solchen Dingen immer sehr hilfreich.
DebianHowTo
echo "[q]sa[ln0=aln256%Pln256/snlbx]sb729901041524823122snlbxq"|dc
echo "[q]sa[ln0=aln256%Pln256/snlbx]sb729901041524823122snlbxq"|dc
Anfänger
Sorry was ist mtop und wo finde ich es?
Gruß DIGIMan
Gruß DIGIMan
Re: Datenbank-Auslastung!
mtop ist top für MySQL (welche eine Ã?berraschung), finden tut man das (wie alles andere auch) über Google.
mtop
Also zu mtop habe ich nicht viel gefunden und meist in English, wo mein English nicht besonders ist, und bin damit auch nicht zu ein Ergebnis gekommen. Bitte dazu hier nichts weiter schreiben, sonst kommen wir zu weit vom Thema ab. Danke
Ich warte auf bessere Vorschläge?
Gruß DIGIMan
Ich warte auf bessere Vorschläge?
Gruß DIGIMan
-
- Posts: 64
- Joined: 2002-10-24 21:37
Re: Datenbank-Auslastung!
das tool heisst wohl mytop :D ... oder es ist ein anderesCaptainCrunch wrote:Schau dir mal mtop an, ist bei solchen Dingen immer sehr hilfreich.
http://jeremy.zawodny.com/mysql/mytop/
Re: Datenbank-Auslastung!
Das Tool heißt mtop, wenn man das bei Google eingibt:
2. Treffer bei Google: http://sourceforge.net/projects/mtop/
6. Treffer bei Google: http://freshmeat.net/projects/mtop/
2. Treffer bei Google: http://sourceforge.net/projects/mtop/
6. Treffer bei Google: http://freshmeat.net/projects/mtop/
Re: Datenbank-Auslastung!
mach mal das log-bin raus.. Dann wirst du den ersten Geschwindigkeitsschub bekommen..
Re: Datenbank-Auslastung!
Und füge
in Deine my.cnf ein.
Ein, dann gehts auch mit den Verbindungen von mehr als 100, nämlich 250
Code: Select all
set-variable = max_connections=250
Ein, dann gehts auch mit den Verbindungen von mehr als 100, nämlich 250