vampsm
Member
Hallo an alle,
gleiches Thema / Problem wie alle anderen.....
beim Aufruf eines Web-Projektes dauert es ca. 4-5 Sekunden bis der SQL-Server reagiert ist nicht so lang, aber es nervt doch schon ein bisschen und wenn man andere Seiten sieht....
Mein Server scheint auch nur beim ersten Zugriff diese Denkpause zu haben
hier mal ein Projekt was schon Online ist.
http://www.smo-tec.de
Hintergrund
Ist ein V-Server (noch der kleinste bei Strato) aber derzeit sind noch nicht so viele Zugriffe, sodass der RAM eigentlich reicht ->> werde demnächst einen größeren nehmen.
Suse 11.1 Plesk und Webmin zur Verwaltung (Webmin kann richtig viel )
derzeit 27 DB davon bleiben 12 aktiv in Benutzung, und 10 Projekte
Habe die Daten als PDF angehängt
meine my.conf habe ich so angepasst: (die aktiven Einstellungen)
Die server-tunning.conf habe ich so angepasst (die wichtigsten und aktiven Einstellungen)
free sagt
./tuning-primer.sh sagt:
Und ./mysqltuner.pl sagt
Welche werte muß ich effektiv anpassen um die Fehler-Meldungen / Hinweise in den Tuning Tools zu beseitigen??
Ist die Verzögerung beim Zugriff eine Einstellung-Sache oder Server-Leistung??
Und was muß ich noch tun damit diese log_slow_queries LOG angelegt wird und die Funktion überhaupt geht ???
Mit MYSQL Dumper mache ich täglich ein Backup und Optimierung der DB
DANKE an alle
gleiches Thema / Problem wie alle anderen.....
beim Aufruf eines Web-Projektes dauert es ca. 4-5 Sekunden bis der SQL-Server reagiert ist nicht so lang, aber es nervt doch schon ein bisschen und wenn man andere Seiten sieht....
Mein Server scheint auch nur beim ersten Zugriff diese Denkpause zu haben
hier mal ein Projekt was schon Online ist.
http://www.smo-tec.de
Hintergrund
Ist ein V-Server (noch der kleinste bei Strato) aber derzeit sind noch nicht so viele Zugriffe, sodass der RAM eigentlich reicht ->> werde demnächst einen größeren nehmen.
Suse 11.1 Plesk und Webmin zur Verwaltung (Webmin kann richtig viel )
derzeit 27 DB davon bleiben 12 aktiv in Benutzung, und 10 Projekte
Habe die Daten als PDF angehängt
meine my.conf habe ich so angepasst: (die aktiven Einstellungen)
Code:
# The MySQL server
[mysqld]
set-variable=local-infile=0
port = 3306
socket = /var/lib/mysql/mysql.sock
skip-locking
------------------ hier sind Änderungen von mir
key_buffer = 4M
max_allowed_packet = 2M
table_cache = 5M
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 512K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 4M
query_cache_size = 20M
join_buffer_size = 2M
tmp_table_size = 32M
max_heap_table_size = 32M
thread_cache_size = 4
key_buffer_size = 15M
max_connections = 30
long_query_time = 2
low_priority_updates = 1
log_slow_queries=/var/log/mysqld.slow.log - die LOG wird nicht angelegt ????
------------------ hier sind Änderungen von mir
server-id = 1
[mysqldump]
quick
max_allowed_packet = 16M
[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
[mysqld_multi]
mysqld = /usr/bin/mysqld_safe
mysqladmin = /usr/bin/mysqladmin
log = /var/log/mysqld_multi.log
Die server-tunning.conf habe ich so angepasst (die wichtigsten und aktiven Einstellungen)
Code:
<IfModule prefork.c>
StartServers 2
MinSpareServers 2
MaxSpareServers 10
ServerLimit 150
MaxClients 150
MaxRequestsPerChild 10000
</IfModule>
# worker MPM
<IfModule worker.c>
StartServers 3
MinSpareThreads 25
MaxSpareThreads 75
ThreadLimit 64
MaxClients 150
ThreadsPerChild 25
MaxRequestsPerChild 10000
</IfModule>
KeepAlive On
MaxKeepAliveRequests 300 ------------------ hier sind Änderungen von mir
KeepAliveTimeout 5 ------------------ hier sind Änderungen von mir
free sagt
Code:
total used free shared buffers cached
Mem: 1048576 324772 723804 0 0 0
-/+ buffers/cache: 324772 723804
Swap: 0 0 0
./tuning-primer.sh sagt:
Code:
Uptime = 2 days 3 hrs 17 min 40 sec
Avg. qps = 2
Total Questions = 479048
Threads Connected = 1
Server has been running for over 48hrs.
It should be safe to follow these recommendations
SLOW QUERIES
The slow query log is enabled.
Current long_query_time = 2 sec.
You have 2 out of 479069 that take longer than 2 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
WORKER THREADS
Current thread_cache_size = 4
Current threads_cached = 3
Current threads_per_sec = 0
Historic threads_per_sec = 0
Your thread_cache_size is fine
MAX CONNECTIONS
Current max_connections = 30
Current threads_connected = 1
Historic max_used_connections = 12
The number of used connections is 40% of the configured maximum.
Your max_connections variable seems to be fine.
No InnoDB Support Enabled!
MEMORY USAGE
Max Memory Ever Allocated : 89 M
Configured Max Per-thread Buffers : 110 M
Configured Max Global Buffers : 45 M
Configured Max Memory Limit : 155 M
Physical Memory : 1.00 G
Max memory limit seem to be within acceptable norms
KEY BUFFER
Current MyISAM index space = 10 M
Current key_buffer_size = 15 M
Key cache miss rate is 1 : 47
Key buffer free ratio = 82 %
Your key_buffer_size seems to be fine
QUERY CACHE
Query cache is enabled
Current query_cache_size = 20 M
Current query_cache_used = 16 M
Current query_cache_limit = 1 M
Current Query cache Memory fill ratio = 81.28 %
Current query_cache_min_res_unit = 4 K
However, 13147 queries have been removed from the query cache due to lack of memory
Perhaps you should raise query_cache_size
MySQL won't cache query results that are larger than query_cache_limit in size
SORT OPERATIONS
Current sort_buffer_size = 512 K
Current read_rnd_buffer_size = 512 K
Sort buffer seems to be fine
JOINS
Current join_buffer_size = 2.00 M
You have had 1683 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 = 65535 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 = 32747 tables
You have a total of 3381 tables
You have 4293 open tables.
The table_cache value seems to be fine
TEMP TABLES
Current max_heap_table_size = 32 M
Current tmp_table_size = 32 M
Of 25810 temp tables, 41% were created on disk
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
Current read_buffer_size = 512 K
Current table scan ratio = 106 : 1
read_buffer_size seems to be fine
TABLE LOCKING
Current Lock Wait ratio = 0 : 479255
Your table locking seems to be fine
Und ./mysqltuner.pl sagt
Code:
-------- General Statistics --------------------------------------------------
[--] Skipped version check for MySQLTuner script
[OK] Currently running supported MySQL version 5.0.67-log
[OK] Operating on 32-bit architecture with less than 2GB RAM
-------- Storage Engine Statistics -------------------------------------------
[--] Status: -Archive -BDB -Federated -InnoDB -ISAM -NDBCluster
[--] Data in MyISAM tables: 12M (Tables: 3357)
[--] Data in MEMORY tables: 0B (Tables: 7)
[!!] Total fragmented tables: 44
-------- Performance Metrics -------------------------------------------------
[--] Up for: 2d 3h 21m 45s (479K q [2.593 qps], 9K conn, TX: 397M, RX: 65M)
[--] Reads / Writes: 76% / 24%
[--] Total buffers: 77.0M global + 3.7M per thread (30 max threads)
[OK] Maximum possible memory usage: 187.6M (18% of installed RAM)
[OK] Slow queries: 0% (2/479K)
[OK] Highest usage of available connections: 40% (12/30)
[OK] Key buffer size / total MyISAM indexes: 15.0M/10.8M
[OK] Key buffer hit rate: 97.9% (623K cached / 12K reads)
[OK] Query cache efficiency: 67.0% (235K cached / 351K selects)
[!!] Query cache prunes per day: 6143
[OK] Sorts requiring temporary tables: 0% (0 temp sorts / 10K sorts)
[!!] Joins performed without indexes: 1684
[!!] Temporary tables created on disk: 41% (18K on disk / 43K total)
[OK] Thread cache hit rate: 99% (47 created / 9K connections)
[!!] Table cache hit rate: 19% (4K open / 22K opened)
[OK] Open file limit used: 11% (7K/65K)
[OK] Table locks acquired immediately: 100% (182K immediate / 182K locks)
[!!] Connections aborted: 7%
-------- Recommendations -----------------------------------------------------
General recommendations:
Run OPTIMIZE TABLE to defragment tables for better performance
Adjust your join queries to always utilize indexes
When making adjustments, make tmp_table_size/max_heap_table_size equal
Reduce your SELECT DISTINCT queries without LIMIT clauses
Increase table_cache gradually to avoid file descriptor limits
Your applications are not closing MySQL connections properly
Variables to adjust:
query_cache_size (> 20M)
join_buffer_size (> 2.0M, or always use indexes with joins)
tmp_table_size (> 32M)
max_heap_table_size (> 32M)
table_cache (> 32747)
Welche werte muß ich effektiv anpassen um die Fehler-Meldungen / Hinweise in den Tuning Tools zu beseitigen??
Ist die Verzögerung beim Zugriff eine Einstellung-Sache oder Server-Leistung??
Und was muß ich noch tun damit diese log_slow_queries LOG angelegt wird und die Funktion überhaupt geht ???
Mit MYSQL Dumper mache ich täglich ein Backup und Optimierung der DB
DANKE an alle
Attachments
Last edited by a moderator: