webmaster2208
Member
Hallo Leute,
in einem anderen Thread hatte ich mir versucht Hilfe zu holen wegen meinem lahmen MySQL. Nachdem ich das ganze versucht habe mit tuning-primer.sh zu "optimieren" ist alles noch viel schlimmer und bitte daher um erneut um Hilfe. Irgendwas muss ich da verbockt haben. Vor meiner "Optimierung" war die Response Zeit unter 2s im Schnitt. Jetzt bin ich bei über 10s. Der Server ist pro Stunde für min. 5 Minuten nicht zu erreichen. Ich beziehe mich da auf die Daten von pingdom.com. Siehe Anlagen.
Mittlerweile werden beim einkaufen über paypal schon nicht mehr die Einträge geschafft. Die fehlen oder sind nur halb. So schlimm ist es schon und daher muss ich euch bitten.....bitte, bitte schaut euch die files an. Ich weiss nicht was das Problem ist.
Hier ist meine my.cnf.
tuning-primer.sh Auswertung derzeit. Ich weiss Server muss min. 48 Stunden laufen, aber eben musste SQL neustarten. Ging nicht anders.
top
Da hab ich gerade mal die Startseite aufgemacht. Hat auf sich warten lassen.
Server ist ein Strato Linux Level3 mit 4GB RAM garantiert und max6. 2 CPU's
Vielen Dank für eure Hilfe
in einem anderen Thread hatte ich mir versucht Hilfe zu holen wegen meinem lahmen MySQL. Nachdem ich das ganze versucht habe mit tuning-primer.sh zu "optimieren" ist alles noch viel schlimmer und bitte daher um erneut um Hilfe. Irgendwas muss ich da verbockt haben. Vor meiner "Optimierung" war die Response Zeit unter 2s im Schnitt. Jetzt bin ich bei über 10s. Der Server ist pro Stunde für min. 5 Minuten nicht zu erreichen. Ich beziehe mich da auf die Daten von pingdom.com. Siehe Anlagen.
Mittlerweile werden beim einkaufen über paypal schon nicht mehr die Einträge geschafft. Die fehlen oder sind nur halb. So schlimm ist es schon und daher muss ich euch bitten.....bitte, bitte schaut euch die files an. Ich weiss nicht was das Problem ist.
Hier ist meine my.cnf.
PHP:
#
# 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
innodb_buffer_pool_size=2M
innodb_additional_mem_pool_size=500K
innodb_log_buffer_size=500K
innodb_thread_concurrency=2
[mysqld]
local-infile=0
#
# * 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
#
read_buffer_size = 4M
read_buffer_size = 4M
key_buffer = 4M
max_allowed_packet = 16M
thread_stack = 192K
thread_cache_size = 8
join_buffer_size = 512K
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover = BACKUP
max_connections = 50
table_cache = 2056
table_definition_cache = 2056
#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.
# As of 5.1 you can enable the log at runtime!
#general_log_file = /var/log/mysql/mysql.log
#general_log = 1
#
# Error logging goes to syslog due to /etc/mysql/conf.d/mysqld_safe_syslog.cnf.
#
# 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
#
# * 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!
#
# * 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
innodb_buffer_pool_size=2M
innodb_additional_mem_pool_size=500K
innodb_log_buffer_size=500K
innodb_thread_concurrency=2
[mysqldump]
quick
quote-names
max_allowed_packet = 16M
[mysql]
#no-auto-rehash # faster start of mysql but no tab completition
[isamchk]
key_buffer = 4M
#
# * 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/
tuning-primer.sh Auswertung derzeit. Ich weiss Server muss min. 48 Stunden laufen, aber eben musste SQL neustarten. Ging nicht anders.
Code:
MySQL Version 5.1.72-2 i486
Uptime = 0 days 2 hrs 0 min 56 sec
Avg. qps = 10
Total Questions = 74057
Threads Connected = 4
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 78 out of 74078 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 = 8
Current threads_cached = 6
Current threads_per_sec = 0
Historic threads_per_sec = 0
Your thread_cache_size is fine
MAX CONNECTIONS
Current max_connections = 50
Current threads_connected = 4
Historic max_used_connections = 18
The number of used connections is 36% of the configured maximum.
Your max_connections variable seems to be fine.
INNODB STATUS
Current InnoDB index space = 3 M
Current InnoDB data space = 4 M
Current InnoDB buffer pool free = 0 %
Current innodb_buffer_pool_size = 2 M
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 : 159 M
Configured Max Per-thread Buffers : 346 M
Configured Max Global Buffers : 34 M
Configured Max Memory Limit : 381 M
Physical Memory : 6.00 G
Max memory limit seem to be within acceptable norms
KEY BUFFER
Current MyISAM index space = 22 M
Current key_buffer_size = 16 M
Key cache miss rate is 1 : 192980
Key buffer free ratio = 82 %
Your key_buffer_size seems to be too high.
Perhaps you can use these resources elsewhere
QUERY CACHE
Query cache is enabled
Current query_cache_size = 16 M
Current query_cache_used = 2 M
Current query_cache_limit = 1 M
Current Query cache Memory fill ratio = 13.34 %
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 = 2 M
Current read_rnd_buffer_size = 256 K
Sort buffer seems to be fine
JOINS
Current join_buffer_size = 516.00 K
You have had 1420 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 = 4172 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 = 2056 tables
Current table_definition_cache = 2056 tables
You have a total of 1238 tables
You have 1308 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 3719 temp tables, 19% were created on disk
Created disk tmp tables ratio seems fine
TABLE SCANS
Current read_buffer_size = 4 M
Current table scan ratio = 12303 : 1
read_buffer_size seems to be fine
TABLE LOCKING
Current Lock Wait ratio = 1 : 106
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'.
top
Code:
top - 17:36:39 up 2 days, 17:01, 1 user, load average: 0.60, 0.40, 0.33
Tasks: 75 total, 1 running, 74 sleeping, 0 stopped, 0 zombie
Cpu(s): 51.5%us, 6.2%sy, 0.0%ni, 42.3%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 6291456k total, 1132316k used, 5159140k free, 0k buffers
Swap: 0k total, 0k used, 0k free, 617732k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
31662 mysql 20 0 153m 45m 6732 S 100 0.7 48:28.61 mysqld
5555 root 20 0 2328 1124 880 R 0 0.0 0:00.04 top
1 root 20 0 2028 688 608 S 0 0.0 0:01.85 init
2 root 20 0 0 0 0 S 0 0.0 0:00.00 kthreadd/213264
3 root 20 0 0 0 0 S 0 0.0 0:00.00 khelper/2132641
4 root 20 0 0 0 0 S 0 0.0 0:00.00 rpciod/2132641/
5 root 20 0 0 0 0 S 0 0.0 0:00.00 rpciod/2132641/
6 root 20 0 0 0 0 S 0 0.0 0:00.00 rpciod/2132641/
7 root 20 0 0 0 0 S 0 0.0 0:00.00 rpciod/2132641/
8 root 20 0 0 0 0 S 0 0.0 0:00.00 rpciod/2132641/
9 root 20 0 0 0 0 S 0 0.0 0:00.00 rpciod/2132641/
10 root 20 0 0 0 0 S 0 0.0 0:00.00 rpciod/2132641/
11 root 20 0 0 0 0 S 0 0.0 0:00.00 rpciod/2132641/
12 root 20 0 0 0 0 S 0 0.0 0:00.00 nfsiod/2132641
517 root 20 0 1736 604 508 S 0 0.0 0:01.80 syslogd
539 bind 20 0 59404 4936 1788 S 0 0.1 0:00.04 named
559 root 20 0 118m 14m 7588 S 0 0.2 0:08.78 apache2
576 root 20 0 3300 616 504 S 0 0.0 0:00.00 couriertcpd
578 root 20 0 1540 340 288 S 0 0.0 0:00.00 courierlogger
588 root 20 0 3300 616 504 S 0 0.0 0:00.00 couriertcpd
590 root 20 0 1540 344 288 S 0 0.0 0:00.00 courierlogger
597 root 20 0 3300 624 512 S 0 0.0 0:00.09 couriertcpd
599 root 20 0 1672 520 448 S 0 0.0 0:00.08 courierlogger
607 root 20 0 3300 624 512 S 0 0.0 0:00.03 couriertcpd
609 root 20 0 1672 516 448 S 0 0.0 0:00.02 courierlogger
630 root 20 0 3808 948 752 S 0 0.0 0:00.60 cron
640 messageb 20 0 2580 884 632 S 0 0.0 0:00.05 dbus-daemon
651 avahi 20 0 3056 1472 1088 S 0 0.0 0:00.15 avahi-daemon
652 avahi 20 0 2836 380 240 S 0 0.0 0:00.00 avahi-daemon
1070 root 20 0 5272 680 308 S 0 0.0 0:00.00 nginx
1072 nginx 20 0 6036 2804 1668 S 0 0.0 1:36.04 nginx
1080 postfix 20 0 64000 1404 1124 S 0 0.0 0:04.95 psa-pc-remote
1188 root 20 0 5780 1592 1492 S 0 0.0 0:31.10 master
1200 postfix 20 0 5936 1720 1536 S 0 0.0 0:24.81 qmgr
1226 root 20 0 2392 796 668 S 0 0.0 0:00.00 xinetd
1281 root 20 0 10900 3444 2800 S 0 0.1 0:00.02 sshd
1282 root 20 0 10900 3492 2832 S 0 0.1 0:00.02 sshd
1285 root 20 0 10900 3444 2800 S 0 0.1 0:00.02 sshd
1288 root 20 0 10900 3496 2832 S 0 0.1 0:00.02 sshd
1563 sw-cp-se 20 0 6088 3396 1708 S 0 0.1 0:05.23 sw-cp-serverd
2392 drweb 20 0 215m 161m 540 S 0 2.6 0:31.79 drwebd.real
2398 root 20 0 5488 692 588 S 0 0.0 0:00.10 sshd
3136 postfix 20 0 6356 2200 1916 S 0 0.0 0:00.15 tlsmgr
3886 web001 20 0 106m 19m 12m S 0 0.3 0:05.48 php5-cgi
4011 web001 20 0 104m 31m 26m S 0 0.5 0:03.63 php5-cgi
4017 web001 20 0 104m 23m 17m S 0 0.4 0:00.96 php5-cgi
4018 web001 20 0 104m 23m 18m S 0 0.4 0:00.55 php5-cgi
4024 web001 20 0 104m 27m 22m S 0 0.5 0:03.12 php5-cgi
4025 web001 20 0 104m 22m 17m S 0 0.4 0:01.34 php5-cgi
4030 web001 20 0 105m 30m 24m S 0 0.5 0:01.86 php5-cgi
4067 www-data 20 0 119m 9852 2156 S 0 0.2 0:00.26 apache2
4133 postfix 20 0 5796 1820 1464 S 0 0.0 0:00.00 pickup
4174 www-data 20 0 119m 9900 2160 S 0 0.2 0:00.20 apache2
4195 www-data 20 0 119m 9884 2156 S 0 0.2 0:00.15 apache2
4844 www-data 20 0 119m 9868 2156 S 0 0.2 0:00.10 apache2
4868 www-data 20 0 119m 9884 2156 S 0 0.2 0:00.05 apache2
4869 www-data 20 0 119m 9836 2156 S 0 0.2 0:00.05 apache2
4881 root 20 0 8048 1908 1432 S 0 0.0 0:00.00 cron
4885 root 20 0 58988 19m 10m S 0 0.3 0:00.18 sw-engine
4924 www-data 20 0 119m 9648 2144 S 0 0.2 0:00.00 apache2
4928 www-data 20 0 119m 9676 2144 S 0 0.2 0:00.01 apache2
Da hab ich gerade mal die Startseite aufgemacht. Hat auf sich warten lassen.
Server ist ein Strato Linux Level3 mit 4GB RAM garantiert und max6. 2 CPU's
Vielen Dank für eure Hilfe