MySQL Performance Tuning mit Tuning-Primer.sh Script

Code:
Current max_heap_table_size = 63 M
Current tmp_table_size = 64 M
brauchst du nicht in die my.cnf eintragen!

Dann würde ich noch ändern:

Code:
key_buffer_size = 8 M
query_cache_size = 2M
join_buffer_size = 512K
table_cache = 1024

Und Apache optimieren, vorallem die KeepAlive Einstellungen z.B. KeepAliveTimeout 2

Code:
98.5% id

id = Idle Time, CPU wird nicht beansprucht (Pause)

us = User Time, CPU wird von Programmen beansprucht (produktiv)
sy = System Time, CPU wird vom Kernel beansprucht (produktiv)
ni = Nice Time, CPU wird von Prozessen beansprucht (produktiv)
wa = Wait Time, CPU wartet auf I/O z.B. Festplatte, Netzwerk (unproduktiv, sollte vermieden werden!)
 
Last edited by a moderator:
Hallo zusammen,
stehe vor einem Problem, mein MySQL-Server stützt ab und zu mal ab.

zum System: vServer 1,2 Ram, Debian
Code:
top - 00:22:02 up 57 days,  2:51,  1 user,  load average: 0.30, 0.42, 0.44
Tasks:  37 total,   1 running,  36 sleeping,   0 stopped,   0 zombie
Cpu(s):  5.6% us,  0.8% sy,  0.0% ni, 93.6% id,  0.0% wa,  0.0% hi,  0.0% si
Mem:   1310720k total,   313252k used,   997468k free,        0k buffers
Swap:        0k total,        0k used,        0k free,        0k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
10060 www-data  15   0 30832  13m 4548 S 10.3  1.0   0:52.56 apache2
 9577 mysql     15   0 43760  33m 4116 S  6.0  2.6 408:51.25 mysqld
 6037 www-data  16   0 30976  13m 5208 S  5.7  1.1   2:32.05 apache2
 5629 www-data  15   0 31036  13m 4568 S  3.3  1.0   2:23.05 apache2
    1 root      17   1  1504  120   60 S  0.0  0.0   0:21.72 init
15385 root      16   0  1560  348  252 S  0.0  0.0   0:30.52 syslogd
15503 clamav    15   0 91032  64m  888 S  0.0  5.0  21:28.19 clamd
15544 clamav    16   0  4620 1292  524 S  0.0  0.1   0:13.64 freshclam
15698 root      15   0  1540  288  220 S  0.0  0.0   0:02.89 inetd
15833 root      16   0  6660 1360 1048 S  0.0  0.1   0:00.48 saslauthd
15839 root      16   0  3468  404  168 S  0.0  0.0   0:36.63 sshd
15853 ftpadmin  16   0  4072  728  140 S  0.0  0.1   0:10.57 proftpd
15860 root      16   0  1764  360  216 S  0.0  0.0   0:02.06 cron
23583 Debian-e  16   0  8440  928  508 S  0.0  0.1   0:02.79 exim4
 9535 root      18   0  2316 1112  916 S  0.0  0.1   0:00.00 mysqld_safe
 9578 root      16   0  1488  500  440 S  0.0  0.0   0:00.00 logger
23886 root      16   0 25460 9740 6220 S  0.0  0.7   0:09.95 apache2
 6039 www-data  15   0 30864  13m 5140 S  0.0  1.1   2:34.31 apache2
30339 www-data  15   0 31228  14m 5212 S  0.0  1.1   2:36.39 apache2
30393 www-data  15   0 30932  13m 5116 S  0.0  1.1   1:42.85 apache2
 5631 www-data  15   0 31320  14m 5124 S  0.0  1.1   2:53.82 apache2
10003 www-data  15   0 35228  19m 6104 S  0.0  1.5   1:34.61 apache2
10004 www-data  15   0 31040  13m 5112 S  0.0  1.1   1:28.73 apache2
10005 www-data  16   0 31152  14m 5228 S  0.0  1.1   0:56.67 apache2
26161 www-data  15   0 31384  13m 4356 S  0.0  1.1   2:27.67 apache2
28165 www-data  15   0 31040  13m 4428 S  0.0  1.0   1:25.29 apache2
28223 root      16   0 16668 1860 1476 S  0.0  0.1   0:00.17 sshd
28245 root      15   0  2612 1488 1160 S  0.0  0.1   0:00.01 bash
 3777 root      16   0 17680 1860 1448 S  0.0  0.1   0:00.06 sshd
 3780 root      16   0  3200 1080  788 S  0.0  0.1   0:00.22 sftp-server
10054 www-data  15   0 30896  13m 4388 S  0.0  1.0   0:23.37 apache2
10055 www-data  15   0 30776  12m 4344 S  0.0  1.0   0:22.42 apache2
10056 www-data  15   0 31036  13m 4388 S  0.0  1.0   0:58.64 apache2
10057 www-data  15   0 30888  13m 4396 S  0.0  1.0   0:58.44 apache2
10063 www-data  16   0 30520  12m 4388 S  0.0  1.0   0:20.73 apache2
10065 www-data  16   0 30872  13m 4400 S  0.0  1.0   0:54.85 apache2
24017 root      15   0  2064 1032  832 R  0.0  0.1   0:00.00 top

Apache-Einstellungen:
Code:
MaxKeepAliveRequests 100
KeepAliveTimeout 5
<IfModule prefork.c>
StartServers       5
MinSpareServers    5
MaxSpareServers   10
ServerLimit 	 50
MaxClients       50
MaxRequestsPerChild  1000
</IfModule>

-- MYSQL PERFORMANCE TUNING PRIMER --
Code:
MySQL Version 4.1.11-Debian_4sarge2-log i386

Uptime = 10 days 3 hrs 21 min 12 sec
Avg. qps = 21
Total Questions = 18981706
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/4.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 enabled.
Current long_query_time = 2 sec.
You have 27 out of 18981720 that take longer than 2 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 = 12
Current threads_cached = 9
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 = 2
Historic max_used_connections = 26
The number of used connections is 52% of the configured maximum.
Your max_connections variable seems to be fine.

MEMORY USAGE
Max Memory Ever Allocated : 99 M
Configured Max Per-thread Buffers : 132 M
Configured Max Global Buffers : 30 M
Configured Max Memory Limit : 162 M
Physical Memory : 1.25 G
Max memory limit seem to be within acceptable norms

KEY BUFFER
Current MyISAM index space = 38 M
Current key_buffer_size = 16 M
Key cache miss rate is 1 : 2211
Key buffer fill ratio = 92.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 enabled
Current query_cache_size = 4 M
Current query_cache_used = 3 M
Current query_cache_limit = 1 M
Current Query cache Memory fill ratio = 80.94 %
Current query_cache_min_res_unit = 4 K
However, 1634916 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 = 2 M
Current read_rnd_buffer_size = 256 K
Sort buffer seems to be fine

JOINS
Current join_buffer_size = 132.00 K
You have had 10456 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 = 1084 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 301 tables
You have 428 open tables.
The table_cache value seems to be fine

TEMP TABLES
Current max_heap_table_size = 31 M
Current tmp_table_size = 32 M
Of 555423 temp tables, 45% 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
Current read_buffer_size = 128 K
Current table scan ratio = 35 : 1
read_buffer_size seems to be fine

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

und hier noch MySQLTuner 0.9.9
Code:
 >>  MySQLTuner 0.9.9 - Major Hayden <major@mhtx.net>
 >>  Bug reports, feature requests, and downloads at http://mysqltuner.com/
 >>  Run with '--help' for additional options and output filtering

-------- General Statistics --------------------------------------------------
[--] Skipped version check for MySQLTuner script
[!!] Your MySQL version 4.1.11-Debian_4sarge2-log is EOL software!  Upgrade soon!
[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: 113M (Tables: 294)
[--] Data in HEAP tables: 378K (Tables: 7)
[!!] ISAM is enabled but isn't being used
[!!] Total fragmented tables: 10

-------- Performance Metrics -------------------------------------------------
[--] Up for: 10d 3h 25m 47s (18M q [21.676 qps], 880K conn, TX: 1B, RX: 1B)
[--] Reads / Writes: 69% / 31%
[--] Total buffers: 62.0M global + 2.6M per thread (50 max threads)
[OK] Maximum possible memory usage: 193.2M (15% of installed RAM)
[OK] Slow queries: 0% (27/18M)
[OK] Highest usage of available connections: 52% (26/50)
[OK] Key buffer size / total MyISAM indexes: 16.0M/38.4M
[OK] Key buffer hit rate: 100.0% (389M cached / 176K reads)
[OK] Query cache efficiency: 62.5% (8M cached / 14M selects)
[!!] Query cache prunes per day: 161390
[OK] Sorts requiring temporary tables: 0% (0 temp sorts / 1M sorts)
[!!] Joins performed without indexes: 10459
[!!] Temporary tables created on disk: 31% (254K on disk / 810K total)
[OK] Thread cache hit rate: 99% (164 created / 880K connections)
[OK] Table cache hit rate: 76% (428 open / 563 opened)
[OK] Open file limit used: 66% (718/1K)
[OK] Table locks acquired immediately: 99% (13M immediate / 13M locks)

-------- Recommendations -----------------------------------------------------
General recommendations:
    Add skip-isam to MySQL configuration to disable ISAM
    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
Variables to adjust:
    query_cache_size (> 4M)
    join_buffer_size (> 128.0K, or always use indexes with joins)
    tmp_table_size (> 32M)
    max_heap_table_size (> 31M)

Könnt ihr mir ein Paar Tipps geben um die Einstellungen zu optimieren ?

Vielen Dank
 
Last edited by a moderator:
mein MySQL-Server stützt ab und zu mal ab.
So richtig mit allem drum und dran aus dem Speicher? Sind gleichzeitig noch andere Programme betroffen?
Was steht im mysql.err und syslog/messages?
Wie sieht Dein Beancounter aus?

MySQL ist nicht der Typ der einfach so aufgibt. Ich würde den Fehler nicht in den Parametern suchen sondern in anderen Ursachen.

huschi.
 
MOD: Full-Quote entfernt!
Danke für die rasche Antwort.
es kommen erst Fehlermeldungen fork failed: Cannot allocate memory
und dann Can't find file: 'table.MYI', der Apache-Server läuft weiter, aber MySQL muss neu gestartet werden.
in Beancounter wurde die maximal zugesichertes RAM bereits überschritten, habe leider keine Ahnung wie man die Werte aus Beancounter zurücksetzen kann.

Genaueren Informationen kann ich erst heute Abend posten.

Als Reaktion darauf habe ich die MaxClients von 150 auf 50 gesetzt, möchte aber natürlich das maximale aus dem Server rausholen.
 
Last edited by a moderator:
fork failed: Cannot allocate memory
und dann Can't find file: 'table.MYI',
Wo stehen die Fehler?
Ist die MYI denn wirklich vorhanden?
Wenn ja, stehen im Beancounter auch andere Überschreitungen?

möchte aber natürlich das maximale aus dem Server rausholen.
Auf Kosten der Stabilität?
Hast Du wirklich 150 gleichzeitige Requests auf der Maschine?
Wenn wirklich "ja", solltest Du mit AdSense ausreichend Geld verdienen um einen größeren Server zu mieten.

Meiner Meinung nach sieht das eher nach einer allgemeinen Speicheroptimierung aus. Und da fängt man natürlich bei dem großen Speicherfresser "Apache" an.

huschi.
 
also jetzt,
letzter absturzt war am 1 September:
im daemon.log steht:
Code:
Sep  1 18:51:27 vs243017 mysqld[9569]: 080901 18:51:27 [ERROR] Error in accept: Too many open files in system
Sep  1 18:51:28 vs243017 mysqld[9569]: 080901 18:51:28 [ERROR] mysqld: Got error 12 from select
Sep  1 18:51:40 vs243017 inetd[15698]: fork: Cannot allocate memory
Sep  1 18:51:43 vs243017 mysqld_safe[1745]: Number of processes running now: 0
Sep  1 18:51:43 vs243017 mysqld_safe[1747]: restarted
Sep  1 18:51:44 vs243017 mysqld[1750]: /usr/sbin/mysqld: ready for connections.
Sep  1 18:51:44 vs243017 mysqld[1750]: Version: '4.1.11-Debian_4sarge2-log'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  Source distribution
Sep  1 18:52:53 vs243017 mysqld[1750]: 080901 18:52:52 [ERROR] mysqld: Got error 12 from select
Sep  1 18:53:04 vs243017 mysqld_safe[3371]: Number of processes running now: 0
Sep  1 18:53:04 vs243017 mysqld_safe[3382]: restarted
Sep  1 18:53:05 vs243017 mysqld[3388]: /usr/sbin/mysqld: ready for connections.
Sep  1 18:53:05 vs243017 mysqld[3388]: Version: '4.1.11-Debian_4sarge2-log'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  Source distribution
Sep  1 18:53:10 vs243017 mysqld[3388]: 080901 18:53:09 [ERROR] /usr/sbin/mysqld: Can't open file: 'business_directory_cat.MYI' (errno: 23)
Sep  1 18:53:10 vs243017 mysqld[3388]: 080901 18:53:10 [ERROR] /usr/sbin/mysqld: Can't find file: './wwwnm/chat_users.frm' (errno: 23)
Sep  1 18:53:10 vs243017 mysqld[3388]: 080901 18:53:10 [ERROR] /usr/sbin/mysqld: Can't find file: './wwwnm/nucleus_actionlog.frm' (errno: 23)
Sep  1 18:53:10 vs243017 mysqld[3388]: 080901 18:53:10 [ERROR] /usr/sbin/mysqld: Can't find file: './wwwnm/nucleus_activation.frm' (errno: 23)
Sep  1 18:53:10 vs243017 mysqld[3388]: 080901 18:53:10 [ERROR] /usr/sbin/mysqld: Can't find file: './wwwnm/nucleus_ban.frm' (errno: 23)
Sep  1 18:53:10 vs243017 mysqld[3388]: 080901 18:53:10 [ERROR] /usr/sbin/mysqld: Can't find file: './wwwnm/nucleus_blog.frm' (errno: 23)
Sep  1 18:53:10 vs243017 mysqld[3388]: 080901 18:53:10 [ERROR] /usr/sbin/mysqld: Can't find file: './wwwnm/nucleus_category.frm' (errno: 23)
... und so ueber alle TABELLEN
Sep  1 18:53:39 vs243017 mysqld[3388]: 080901 18:53:39 [ERROR] Error in accept: Too many open files in system
Sep  1 18:53:44 vs243017 mysqld_safe[3682]: Number of processes running now: 0
Sep  1 18:53:44 vs243017 mysqld_safe[3684]: restarted
Sep  1 18:53:44 vs243017 mysqld[3687]: /usr/sbin/mysqld: ready for connections.
Sep  1 18:53:44 vs243017 mysqld[3687]: Version: '4.1.11-Debian_4sarge2-log'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  Source distribution
Sep  1 18:53:47 vs243017 mysqld[3687]: 080901 18:53:47 [ERROR] mysqld: Got error 12 from select
Sep  1 18:53:49 vs243017 mysqld[3687]: 080901 18:53:49 [ERROR] /usr/sbin/mysqld: Can't find file: './wwwnm/phpbb_auth_access.frm' (errno: 23)
Sep  1 18:53:55 vs243017 mysqld[3687]: 080901 18:53:55 [ERROR] Error in accept: Too many open files in system
Sep  1 18:53:56 vs243017 mysqld[3687]: 080901 18:53:56 [ERROR] /usr/sbin/mysqld: Can't find file: './adnm/adpeeps_statisticsiplog.frm' (errno: 23)
Sep  1 18:53:56 vs243017 mysqld[3687]: 080901 18:53:56 [ERROR] /usr/sbin/mysqld: Can't find file: './wwwnm/phpbb_stats_modules.frm' (errno: 23)
... 
Sep  1 18:54:55 vs243017 mysqld[3687]: 080901 18:54:55 [ERROR] /usr/sbin/mysqld: Can't open file: 'nucleus_activation.MYI' (errno: 23)
Sep  1 18:55:00 vs243017 mysqld_safe[5399]: Number of processes running now: 0
Sep  1 18:55:00 vs243017 mysqld_safe[5403]: restarted
Sep  1 18:55:00 vs243017 mysqld[5407]: /usr/sbin/mysqld: ready for connections.
Sep  1 18:55:00 vs243017 mysqld[5407]: Version: '4.1.11-Debian_4sarge2-log'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  Source distribution

=== RESTART ===
Sep  1 20:52:07 vs243017 mysqld_safe[9575]: started
Sep  1 20:52:08 vs243017 mysqld[9578]: /usr/sbin/mysqld: ready for connections.
Sep  1 20:52:08 vs243017 mysqld[9578]: Version: '4.1.11-Debian_4sarge2-log'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  Source distribution
Sep  1 20:52:09 vs243017 /etc/mysql/debian-start[9607]: Checking for crashed MySQL tables.
Sep  1 20:52:15 vs243017 /etc/mysql/debian-start[9663]: WARNING: mysqlcheck has found corrupt tables
Sep  1 20:52:15 vs243017 /etc/mysql/debian-start[9663]: adnm.adpeeps_activepages
Sep  1 20:52:15 vs243017 /etc/mysql/debian-start[9663]: warning  : 1 client is using or hasn't closed the table properly
Sep  1 20:52:15 vs243017 /etc/mysql/debian-start[9663]: adnm.adpeeps_activepagesiplog

=== und so fast uber alle Tabellen

Sep  1 20:52:15 vs243017 /etc/mysql/debian-start[9663]: wwwnm.portal_news
Sep  1 20:52:15 vs243017 /etc/mysql/debian-start[9663]: warning  : 1 client is using or hasn't closed the table properly
Sep  1 20:52:15 vs243017 /etc/mysql/debian-start[9663]: 
Sep  1 20:52:15 vs243017 /etc/mysql/debian-start[9663]:  Improperly closed tables are also reported if clients are accessing
Sep  1 20:52:15 vs243017 /etc/mysql/debian-start[9663]:  the tables *now*. A list of current connections is below.

zu dieser Zeit aus dem Apache error.log
Code:
[Mon Sep 01 18:03:26 2008] [error] [client 87.106.28.93] File does not exist: /var/www/forum/plugins
[Mon Sep 01 18:51:17 2008] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Mon Sep 01 18:51:20 2008] [error] [client 192.68.112.136] File does not exist: /var/www/forum/images/rss.jpg , referer: http://www.nash-mir.kz/forum/ptopic-155547.html
[Mon Sep 01 18:51:27 2008] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Mon Sep 01 18:51:37 2008] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Mon Sep 01 18:52:50 2008] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Mon Sep 01 18:53:00 2008] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Mon Sep 01 18:53:10 2008] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Mon Sep 01 18:53:20 2008] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Mon Sep 01 18:53:30 2008] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Mon Sep 01 18:53:41 2008] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Mon Sep 01 18:53:52 2008] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Mon Sep 01 18:54:02 2008] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Mon Sep 01 18:54:10 2008] [error] (12)Cannot allocate memory: apr_poll: (listen)
[Mon Sep 01 18:54:12 2008] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Mon Sep 01 18:54:22 2008] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Mon Sep 01 18:54:32 2008] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Mon Sep 01 18:54:48 2008] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Mon Sep 01 18:55:02 2008] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Mon Sep 01 18:55:12 2008] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Mon Sep 01 18:55:22 2008] [error] (12)Cannot allocate memory: fork: Unable to fork new process

Nach dem Neustart alles wieder im grünen Bereich.

Auszug aus dem Beancounter:
Code:
uid  resource                     held              maxheld              barrier                limit              failcnt
    243017: kmemsize                  6883271             17777274             17777274             19555001            176923910
            lockedpages                     0                    0                  868                  868                    0
            privvmpages                 77357               199816               327680               344064                    0
            shmpages                     1290                 3375                25078                25078                    0
            dummy                           0                    0                    0                    0                    0
            numproc                        53                  183                  434                  434                    0
            physpages                   55084               143934                    0  9223372036854775807                    0
            vmguarpages                     0                    0               131072  9223372036854775807                    0
            oomguarpages                55085               143935               163840  9223372036854775807                    0
            numtcpsock                     20                  229                  434                  434                    0
            numflock                        3                   24                  694                  763                    0
            numpty                          1                    3                   43                   43                    0
            numsiginfo                      0                   30                 1024                 1024                    0
            tcpsndbuf                  256952              2780120              4148094              5925758                    0
            tcprcvbuf                  327680               960768              4148094              5925758                    0
            othersockbuf                 9376               354016              2074047              3851711                    0
            dgramrcvbuf                     0                31680              2074047              2074047                    0
            numothersock                   11                  175                  434                  434                    0
            dcachesize                  71928               132672              3883246              3999744                    0
            numfile                      2935                 4662                 6944                 6944                    0
            dummy                           0                    0                    0                    0                    0
            dummy                           0                    0                    0                    0                    0
            dummy                           0                    0                    0                    0                    0
            numiptent                      10                   10                  128                  128                    0

150 gleichzeitige Request habe ich nicht, deswegen habe ich als erstes den MaxClients von 150 auf 50 gesetzt. Das müsste dann 50 * 15 ~ 768 MB und für MySQL blieben dann 512 übrig. Was natürlich an der Grenze wäre, aber wenn ich auf 40 max connektions runter gehe müsste das meine 1,2 gig RAM ausreichen um stabil zu laufen.

Was mich an MySQL beunruhigt sind die Werte bei Key Buffer, Query cache und TEMP Tables.
 
Code:
MaxKeepAliveRequests 100
KeepAliveTimeout 5
alle Werte sollte man der eigenen Webseite anpassen!

Wenn deine Webseite z.B. 120 Bilder hat, dann sollte MaxKeepAlive z.B. 121 sein. Haben deine Seiten z.B. nur 10 Objekte wie .gif Blder reicht auch ein Wert von 25. KeepAliveTimeout würde ich auf 2 oder 1 setzen. Dadurch werden Resourcen besser ausgelastet.

Code:
<IfModule prefork.c>
StartServers       5 [COLOR="Red"](httpd2 oder Apache2 Prozesse, zu sehen unter 'top')[/COLOR]
MinSpareServers    5 [COLOR="Red"](httpd2 bzw. Apache2 Prozesse)[/COLOR]
MaxSpareServers   10 [COLOR="Red"](httpd2 bzw. Apache2 Prozesse)[/COLOR]
ServerLimit 	 50
MaxClients       50 [COLOR="Red"](httpd2 bzw. Apache2 Prozesse)[/COLOR]
MaxRequestsPerChild  1000 [COLOR="Red"](nach 1000 Requests wird der httpd2 bzw. Apache2 Prozess eleminiert und ein neuer gestartet)[/COLOR]
</IfModule>
je höher die Werte, desto mehr RAM sollte man zur Verfügung haben. Bei 1 GB RAM kann der Wert MaxClients zwischen 40 - 50 sein.

Teste mal diese Konfiguration
Code:
<IfModule prefork.c>
StartServers       [COLOR="Red"]2[/COLOR]
MinSpareServers    [COLOR="Red"]2[/COLOR]
MaxSpareServers   [COLOR="Red"]5[/COLOR]
ServerLimit 	 [COLOR="Red"]50[/COLOR]
MaxClients       [COLOR="Red"]45[/COLOR]
MaxRequestsPerChild  [COLOR="Red"]4000[/COLOR]
</IfModule>

Code:
Configured Max Memory Limit : 162 M
momentan verwendet MySQL bei voller Auslastung bis zu 162 MB RAM

Code:
key_buffer_size = 16 M
Wert z.B. auf 20 M erhöhen
Code:
query_cache_size = 4 M
Wert z.B. auf 5 M erhöhen
Code:
sort_buffer_size = 2 M
Wert z.B. auf 128 K verkleinern
Code:
join_buffer_size = 132 K
Wert z.B. auf 2 M erhöhen

Read u. Sort Buffers kann man sehr klein machen z.B. 16 - 32 K

Beispiel:
Code:
sort_buffer_size = 32K
myisam_sort_buffer_size = 32K
read_buffer_size = 16K
read_rnd_buffer_size = 32K
 
Last edited by a moderator:
Änderungen übernommen und zusätzlich noch key_buffer erhöht, mal schauen wie es nach ein paar Tagen aussieht.
 
MySQL Parameter sind bei dir ja so eingestellt, daß maximal ~ 126 MB RAM verwendet werden. Daran wird es also nicht liegen. Schadet aber nicht den RAM auf die Buffers und Caches effizienter zu verteilen :)
Wird eher an KeepAliveTimeout und MaxClients liegen. Ein KeepAliveTimeout von 1 oder 2 bringt meist am meisten Verbesserung.
 
Last edited by a moderator:
also
Code:
#
# * Very Fine Tuning by Lexa
#
#
key_buffer		= 48M # 16
sort_buffer_size = 128K
join_buffer_size = 2M
query_cache_size = 6M
thread_cache_size = 12
table_cache = 512
max_heap_table_size = 48M #32
max_connections = 50
Configured Max Memory Limit : 196 M

MaxKeepAliveRequests 100
KeepAliveTimeout 2

mal schauen wie es sich entwickelt :)
 
Code:
max_heap_table_size = 48M #32
heap_table Werte zu ändern bringt nichts. Sort + Read Buffers würde ich auf 32 K setzen.
 
Last edited by a moderator:
habe den Server heute abend noch mal getestet 5 minuten lang voll last mit 50 simulierten usern

mod_stat
Code:
Total Accesses: 1939
Total kBytes: 36051
CPULoad: 84.0612
Uptime: 441
ReqPerSec: 4.39683
BytesPerSec: 83710.3
BytesPerReq: 19038.8
BusyWorkers: 50
IdleWorkers: 0
Scoreboard: WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
einmal ist mysql weggebrochen
Code:
MAX CONNECTIONS
Current max_connections = 50
Current threads_connected = 1
Historic max_used_connections = 51
The number of used connections is 102% of the configured maximum.
You should raise max_connections

MEMORY USAGE
Max Memory Ever Allocated : 199 M
Configured Max Per-thread Buffers : 132 M
Configured Max Global Buffers : 64 M
Configured Max Memory Limit : 196 M
Physical Memory : 1.25 G
Max memory limit seem to be within acceptable norms
lief später jedoch problemlos, keine error-einträge in den logs

mir fiel auf dass während dem test nur ca 480MB RAM beansprucht wurde, so habe ich kurz max connections auf 100 erhöht und 100 simulierte user drauf gelassen
Code:
Total Accesses: 3645
Total kBytes: 46378
CPULoad: 38.632
Uptime: 682
ReqPerSec: 5.34457
BytesPerSec: 69635
BytesPerReq: 13029.1
BusyWorkers: 85
IdleWorkers: 0
Scoreboard: WWWWWWWWWWWWWWW.WWW..WWWWWWWWWW..WW.WWWWWWW.WWWW.WWW.WWWCWWWWWWW.WWWWWW.CWWWW.WWWWWWWW.W.WWWWWWWW.WW
Speicher verbrauch wuchs bis auf 800 auf.
außer Table Cache blieb der rest im grünen Bereich
Code:
TABLE CACHE
Current table_cache value = 512 tables
You have a total of 301 tables
You have 512 open tables.
Current table_cache hit rate is 52%, while 100% of your table cache is in use
You should probably increase your table_cache

Aber dann kamen auch fehler mysql:
Code:
Sep 12 23:46:22 vs243017 mysqld[23755]: 080912 23:46:21 [ERROR] mysqld: Got error 12 from select
Sep 12 23:46:32 vs243017 mysqld_safe[26450]: Number of processes running now: 0
Sep 12 23:46:32 vs243017 mysqld_safe[26452]: restarted
Sep 12 23:46:33 vs243017 mysqld[26456]: /usr/sbin/mysqld: ready for connections.
Sep 12 23:46:33 vs243017 mysqld[26456]: Version: '4.1.11-Debian_4sarge2-log'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  Source distribution
Sep 12 23:46:45 vs243017 mysqld[26456]: 080912 23:46:45 [ERROR] Error in accept: Cannot allocate memory
Sep 12 23:46:56 vs243017 inetd[15698]: fork: Cannot allocate memory
Sep 12 23:47:01 vs243017 mysqld[26456]: 080912 23:47:00 [ERROR] /usr/sbin/mysqld: Can't find file: './wwwnashmirkz/phpbb_posts_text.frm' (errno: 23)
Sep 12 23:47:09 vs243017 mysqld_safe[27962]: Number of processes running now: 0
Sep 12 23:47:09 vs243017 mysqld_safe[27964]: restarted
Sep 12 23:47:09 vs243017 mysqld[27967]: /usr/sbin/mysqld: ready for connections.
Sep 12 23:47:09 vs243017 mysqld[27967]: Version: '4.1.11-Debian_4sarge2-log'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  Source distribution
Sep 12 23:47:42 vs243017 mysqld[27967]: 080912 23:47:42 [ERROR] Got error 134 when reading table './wwwnashmirkz/phpbb_sessions'


Sep 12 23:53:57 vs243017 mysqld[27967]: 080912 23:53:56 [ERROR] Error in accept: Cannot allocate memory
Sep 12 23:53:57 vs243017 mysqld[27967]: 080912 23:53:57 [ERROR] mysqld: Got error 12 from select
Sep 12 23:54:12 vs243017 mysqld[27967]: 080912 23:54:11 [ERROR] /usr/sbin/mysqld: Sort aborted
Sep 12 23:55:56 vs243017 mysqld[27967]: 080912 23:55:56 [ERROR] /usr/sbin/mysqld: Sort aborted
Sep 12 23:55:56 vs243017 mysqld[27967]: 080912 23:55:56 [ERROR] /usr/sbin/mysqld: Sort aborted
Sep 12 23:56:00 vs243017 mysqld[27967]: 080912 23:56:00 [ERROR] /usr/sbin/mysqld: Sort aborted
Sep 12 23:56:00 vs243017 last message repeated 2 times
Sep 12 23:56:43 vs243017 mysqld[27967]: 080912 23:56:41 [ERROR] /usr/sbin/mysqld: Sort aborted
Sep 12 23:56:43 vs243017 last message repeated 3 times
und apache
Code:
[Fri Sep 12 23:53:41 2008] [error] (12)Cannot allocate memory: apr_accept: (client socket)
[Fri Sep 12 23:53:41 2008] [error] (12)Cannot allocate memory: apr_accept: (client socket)
[Fri Sep 12 23:53:46 2008] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Fri Sep 12 23:53:56 2008] [error] (12)Cannot allocate memory: apr_accept: (client socket)
[Fri Sep 12 23:53:56 2008] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Fri Sep 12 23:53:56 2008] [error] (12)Cannot allocate memory: apr_accept: (client socket)
[Fri Sep 12 23:54:06 2008] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Fri Sep 12 23:54:09 2008] [error] (12)Cannot allocate memory: apr_accept: (client socket)
[Fri Sep 12 23:54:11 2008] [error] (12)Cannot allocate memory: apr_accept: (client socket)
[Fri Sep 12 23:54:16 2008] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Fri Sep 12 23:54:23 2008] [error] (12)Cannot allocate memory: apr_accept: (client socket)
[Fri Sep 12 23:54:26 2008] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Fri Sep 12 23:54:27 2008] [error] (12)Cannot allocate memory: apr_accept: (client socket)
[Fri Sep 12 23:54:37 2008] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Fri Sep 12 23:54:42 2008] [error] (12)Cannot allocate memory: apr_accept: (client socket)
[Fri Sep 12 23:54:48 2008] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Fri Sep 12 23:54:58 2008] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Fri Sep 12 23:55:06 2008] [error] (12)Cannot allocate memory: apr_accept: (client socket)
[Fri Sep 12 23:55:08 2008] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Fri Sep 12 23:55:13 2008] [error] (12)Cannot allocate memory: apr_accept: (client socket)
[Fri Sep 12 23:55:19 2008] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Fri Sep 12 23:55:29 2008] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Fri Sep 12 23:55:34 2008] [error] (12)Cannot allocate memory: apr_accept: (client socket)
[Fri Sep 12 23:55:39 2008] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Fri Sep 12 23:55:43 2008] [error] (12)Cannot allocate memory: apr_accept: (client socket)
[Fri Sep 12 23:55:51 2008] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Fri Sep 12 23:56:00 2008] [error] (12)Cannot allocate memory: apr_accept: (client socket)
[Fri Sep 12 23:56:00 2008] [error] (12)Cannot allocate memory: apr_accept: (client socket)
[Fri Sep 12 23:56:01 2008] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Fri Sep 12 23:56:13 2008] [error] (12)Cannot allocate memory: apr_accept: (client socket)
[Fri Sep 12 23:56:14 2008] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Fri Sep 12 23:56:17 2008] [error] (12)Cannot allocate memory: apr_accept: (client socket)
[Fri Sep 12 23:56:25 2008] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Fri Sep 12 23:56:26 2008] [error] (12)Cannot allocate memory: apr_accept: (client socket)
[Fri Sep 12 23:56:35 2008] [error] (12)Cannot allocate memory: apr_accept: (client socket)
[Fri Sep 12 23:56:38 2008] [error] (12)Cannot allocate memory: fork: Unable to fork new process

also wie es aussieht, soll ich bei 45-50 bleiben.

kommisch dass bei volllast laut top das Speicher nicht komplett aufgebraucht war.

Na gut, mit 50 Verbinfungen scheint das ganze etwas langsamer, aber sehr stabil zu laufen. Keine Fehlermeldungen.
Noch mal alles durchgestartet und werde jetzt abwarten wie sich die Werte entwickeln.

Vielen Dank für die Tipps :)
 
Last edited by a moderator:
würde nicht benötigte Apache Module ausklammern (deaktivieren). Anleitung

@MySQL

Read u. Sort Buffers kann man recht klein machen z.B. 32K

@apache

wichtig ist der Wert für KeepAliveTimeout. Dieser sollte nicht höher als 2 sein.
 
Last edited by a moderator:
Noch eine kurze Frage,

ich habe auf meinem Server4You vServer ja keinen swap und werde wahrscheinlich auch keine Swap-Partition erstellen können, aber ein Swap-File musste eigentlich kein Problem sein oder irre ich mich da ? Speicherplatz habe ich noch sehr viel ca 20 GiG. So könnte ich theoretisch ein 1 gig großes swap-File anlegen ?

Es würde natürlich, wie Huschi schon schrieb, die Problemen damit nicht lösen, aber zumindest einen Spielraum verschaffen um dagegen zu steuern.

ich habe hier noch vzfree laufen lassen:
Momentan genutzt: 290.281 MB
Maximal genutzt: 781.504 MB
Zugesichert: 640 MB
Maximal nutzbar: 1344 MB

bedeutet es, dass erstmal 640MB zur Verfügung stehen und falls die nicht ausreichen, die restlichen nutzbaren eingeschalten werden ?
 
Last edited by a moderator:
aber ein Swap-File musste eigentlich kein Problem sein
Falscher Weg!

erstmal 640MB zur Verfügung stehen und falls die nicht ausreichen, die restlichen nutzbaren eingeschalten werden ?
Nein. Es bedeutet, daß Du nur 640MB zugesicherten Speicher hast, und nicht wie Du behauptest 1,2GB.
Du hast einen kurzzeitlichen Puffer bis zu 1,3GB. Sollte aber nicht dauerhaft genutzt werden. Aber es kann auch zwischendurch passieren, daß gerade kein Puffer frei ist und Dein Server dann trotzdem bei 640MB stagniert.

Oder kurz gesagt:
Du mußt Deinen Server so optimieren, daß Du nur 640MB inkl. OS und allen anderen Diensten verbrauchst.

huschi.
 
Hallo,

wäre lieb wenn sich jemand die Ausgaben von mir auch mal anschauen könnte!

mysqltuner.pl
Code:
 >>  MySQLTuner 0.9.9 - Major Hayden <major@mhtx.net>
 >>  Bug reports, feature requests, and downloads at http://mysqltuner.com/
 >>  Run with '--help' for additional options and output filtering

-------- General Statistics --------------------------------------------------
[--] Skipped version check for MySQLTuner script
[OK] Currently running supported MySQL version 5.0.67-0.dotdeb.1-log
[OK] Operating on 64-bit architecture

-------- Storage Engine Statistics -------------------------------------------
[--] Status: +Archive -BDB -Federated +InnoDB -ISAM -NDBCluster
[--] Data in MyISAM tables: 111M (Tables: 141)
[--] Data in InnoDB tables: 32K (Tables: 1)
[!!] Total fragmented tables: 11

-------- Performance Metrics -------------------------------------------------
[--] Up for: 1d 6h 45m 39s (7M q [65.578 qps], 325K conn, TX: 13B, RX: 450M)
[--] Reads / Writes: 35% / 65%
[--] Total buffers: 42.0M global + 2.6M per thread (1000 max threads)
[!!] Maximum possible memory usage: 2.6G (1174% of installed RAM)
[OK] Slow queries: 0% (77/7M)
[OK] Highest usage of available connections: 38% (384/1000)
[OK] Key buffer size / total MyISAM indexes: 8.0M/29.6M
[OK] Key buffer hit rate: 100.0% (88M cached / 5K reads)
[OK] Query cache efficiency: 75.1% (3M cached / 4M selects)
[OK] Query cache prunes per day: 0
[OK] Sorts requiring temporary tables: 0% (0 temp sorts / 14K sorts)
[!!] Joins performed without indexes: 9132
[!!] Temporary tables created on disk: 28% (1K on disk / 5K total)
[OK] Thread cache hit rate: 97% (8K created / 325K connections)
[OK] Table cache hit rate: 66% (512 open / 771 opened)
[OK] Open file limit used: 13% (669/5K)
[OK] Table locks acquired immediately: 97% (3M immediate / 3M locks)
[OK] InnoDB data size / buffer pool: 32.0K/8.0M

-------- Recommendations -----------------------------------------------------
General recommendations:
    Run OPTIMIZE TABLE to defragment tables for better performance
    Reduce your overall MySQL memory footprint for system stability
    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
Variables to adjust:
  *** MySQL's maximum memory usage exceeds your installed memory ***
  *** Add more RAM before increasing any MySQL buffer variables  ***
    join_buffer_size (> 128.0K, or always use indexes with joins)
    tmp_table_size (> 32M)
    max_heap_table_size (> 16M)

tuning-primer.sh
Code:
        -- MYSQL PERFORMANCE TUNING PRIMER --
             - By: Matthew Montgomery -

MySQL Version 5.0.67-0.dotdeb.1-log x86_64

Uptime = 1 days 6 hrs 46 min 38 sec
Avg. qps = 65
Total Questions = 7265711
Threads Connected = 125

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 enabled.
Current long_query_time = 3 sec.
You have 77 out of 7265790 that take longer than 3 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.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 = 1000
Current threads_connected = 126
Historic max_used_connections = 384
The number of used connections is 38% of the configured maximum.
Your max_connections variable seems to be fine.

MEMORY USAGE
Max Memory Ever Allocated : 1 G
Configured Max Per-thread Buffers : 2 G
Configured Max Global Buffers : 26 M
Configured Max Memory Limit : 2 G
Physical Memory : 227.10 M

Max memory limit exceeds 90% of physical memory

KEY BUFFER
Current MyISAM index space = 29 M
Current key_buffer_size = 8 M
Key cache miss rate is 1 : 16392
Key buffer fill ratio = 80.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 enabled
Current query_cache_size = 8 M
Current query_cache_used = 1 M
Current query_cache_limit = 1 M
Current Query cache Memory fill ratio = 14.39 %
Current query_cache_min_res_unit = 4 K
Query Cache is 22 % fragmented
Run "FLUSH QUERY CACHE" periodically to defragment the query cache memory
If you have many small queries lower 'query_cache_min_res_unit' to reduce fragmentation.
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 = 132.00 K
You have had 9137 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 = 5000 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 159 tables
You have 512 open tables.
Current table_cache hit rate is 66%, while 100% of your table cache is in use
You should probably increase your table_cache

TEMP TABLES
Current max_heap_table_size = 16 M
Current tmp_table_size = 32 M
Of 4075 temp tables, 38% 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
Current read_buffer_size = 128 K
Current table scan ratio = 596 : 1
read_buffer_size seems to be fine

TABLE LOCKING
Current Lock Wait ratio = 1 : 36
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-Ausgabe (erste zeilen)
Code:
top - 14:10:31 up 2 days, 31 min,  1 user,  load average: 0.75, 0.92, 0.78
Tasks:  90 total,   3 running,  87 sleeping,   0 stopped,   0 zombie
Cpu(s):  7.7%us,  8.0%sy,  0.0%ni, 20.0%id, 52.7%wa,  3.0%hi,  8.7%si,  0.0%st
Mem:    232556k total,   228868k used,     3688k free,     1080k buffers
Swap:   522104k total,    84072k used,   438032k free,    84608k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
12982 mysql     20   0  211m  62m 3592 S  5.7 27.6  92:26.70 mysqld
31829 dataup.d  20   0  135m 7796 4272 S  3.3  3.4   0:03.16 apache2
32032 dataup.d  20   0  135m 7728 4216 S  2.7  3.3   0:01.92 apache2
31456 dataup.d  20   0  136m 8612 5040 S  2.0  3.7   0:04.48 apache2
32107 dataup.d  20   0  136m 8476 4912 S  2.0  3.6   0:00.30 apache2
30889 dataup.d  20   0  136m 8812 5168 R  1.3  3.8   0:11.82 apache2
31453 dataup.d  20   0  136m 8688 5048 S  1.3  3.7   0:01.26 apache2
31834 dataup.d  20   0  136m 8628 5044 S  0.7  3.7   0:02.92 apache2
31985 dataup.d  20   0  136m 8560 5004 S  0.7  3.7   0:00.22 apache2
31992 dataup.d  20   0  136m 8480 4912 S  0.7  3.6   0:00.26 apache2
32635 dataup.d  20   0  135m 7616 4128 S  0.7  3.3   0:00.06 apache2
32697 dataup.d  20   0  136m 8184 4696 S  0.7  3.5   0:00.04 apache2
32698 dataup.d  20   0  135m 7740 4204 S  0.7  3.3   0:00.04 apache2

Danke, Gruß Simon
 
Dazu gehören mehr Info's über Dein System!
Die reale Ausstattung (falls es ein Vserver ist), die my.cnf und die Apache-Server-Sektion.

Ansonsten kann man das wesentliche fast nicht übersehen:
Code:
[--] Total buffers: 42.0M global + 2.6M per thread (1000 max threads)
[!!] Maximum possible memory usage: 2.6G (1174% of installed RAM)

Code:
Current max_connections = 1000
Historic max_used_connections = 384

Code:
Max Memory Ever Allocated : 1 G
Configured Max Memory Limit : 2 G
Physical Memory : 227.10 M
Du hast mehr Speicher konfiguriert als Du überhaupt hast.

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

Apache2.conf
Timeout 100
KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimeout 15

MinSpareServers 2
MaxSpareServers 10
StartServers 10
MaxClients 150
MaxRequestsPerChild 0

my.cnf
Code:
connect_timeout = 30
wait_timeout = 1800
key_buffer              = 8M
max_allowed_packet      = 16M
thread_stack            = 128K
thread_cache_size       = 8
max_connections         = 1000
table_cache            = 512
query_cache_limit       = 1M
query_cache_size        = 8M

Gruß Simon
 
Back
Top