SWAP / Kernel Panic Error ?

Alles was in keine andere Systemkategorie passt
chongs45
Posts: 6
Joined: 2015-01-01 17:01
Location: Bad X-Nach

SWAP / Kernel Panic Error ?

Post by chongs45 » 2015-01-04 14:26

Hallo,

habe vor ein paar Tagen diesen Thread geöffnet KLICK .

Wie es ausschaut ist Mysql aber nicht das Problem sondern der Kernel der meine Kiste zum Swapen und Abstürzen bringt.

Mein System ist ein Ubuntu 12.10 mit einem 3.6.10 Kernel der ein Patch von gresec hat, die letzten 2 Jahre lief der Server ohne Probleme und nun stürzt dieser Regelmässig ab.

Habe mal ein Screen angehangen, was die Console mir sagt, wenn der Server hoch booten möchte:

Code: Select all

WARNING: at arch/x86/kernel/smp.c:117 native_smp_send_reschedule+0x51/0x60()
Hardware name: TH678 -> Bios b.z.w Motherboard


Jemand eine Idee dazu?

mfg
ch45
You do not have the required permissions to view the files attached to this post.
Der eine Mag das eine und andere! - Rund um Affiliate Blogs ;)

User avatar
Joe User
Project Manager
Project Manager
Posts: 11599
Joined: 2003-02-27 01:00
Location: Hamburg

Re: SWAP / Kernel Panic Error ?

Post by Joe User » 2015-01-04 15:02

Der Kernel panic wird vom drm Code verursacht. Da ein Server in der Regel kein GUI benötigt, kannst Du drm, kms und Co in der Kernelconfig ruhig deselektieren und den Kernel neu backen.

Den Swap gehen wir an wenn der Server wieder sauber bootet.
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.

chongs45
Posts: 6
Joined: 2015-01-01 17:01
Location: Bad X-Nach

Re: SWAP / Kernel Panic Error ?

Post by chongs45 » 2015-01-07 10:53

Hallo,

erledigt sich wohl erstmal, da mein System immer wieder zusammen bricht!

Code: Select all

stdout: Read-only file system
df -h
df: cannot read table of mounted file systems: Input/output error

stdout: Read-only file system
root@ffh ~ #  ls -al
Bus error
root@ffh ~ #  htop
-bash: /usr/bin/htop: Input/output error


Da ist doch mein Software Raid zerschossen?

mfg
ch45
You do not have the required permissions to view the files attached to this post.
Der eine Mag das eine und andere! - Rund um Affiliate Blogs ;)

User avatar
Joe User
Project Manager
Project Manager
Posts: 11599
Joined: 2003-02-27 01:00
Location: Hamburg

Re: SWAP / Kernel Panic Error ?

Post by Joe User » 2015-01-07 11:08

Das Software-RAID ist es nicht (allein), sondern das Dateisystem oder/und die Festplatten.

Da sind jetzt eine Neuinstallation und eine Hardwareprüfung fällig.
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.

chongs45
Posts: 6
Joined: 2015-01-01 17:01
Location: Bad X-Nach

Re: SWAP / Kernel Panic Error ?

Post by chongs45 » 2015-01-10 13:08

Hallo,

nach dem ich das System neu Aufsetzen musste hier mal meine neuen Daten, ist da noch etwas zum Optimieren dabei?
Würde gerne auch einen neuen schlanken Kernel Backen und mit grsec Patchen, habt Ihr Tipps was man an der Config auskommentieren sollte.

Beu Ubuntu hätte ich den Server Kernel und die Config genommen, aber gibt ja bei DB7 nicht.

Bin für jede Idee und Ratschläge Dankbar

ch45


Debian 7 | Intel(R) Core(TM) i5-2400 CPU @ 3.10GHz / 4 Cores | 16 GB | 3.2.0-4-amd64

free -m

Code: Select all

total       used       free     shared    buffers     cached
Mem:         15810      13822       1987          0        462       8579
-/+ buffers/cache:       4780      11030
Swap:         7623          2       7621


top

Code: Select all

top - 13:05:16 up 2 days, 16:39,  3 users,  load average: 0,12, 0,25, 0,36
Tasks: 252 total,   1 running, 251 sleeping,   0 stopped,   0 zombie
%Cpu(s):  3,7 us,  0,4 sy,  0,0 ni, 93,4 id,  2,4 wa,  0,0 hi,  0,0 si,  0,0 st
KiB Mem:  16190080 total, 14195372 used,  1994708 free,   473700 buffers
KiB Swap:  7806904 total,     2180 used,  7804724 free,  8785464 cached




Apache2 + fcgid

Code: Select all

Server version: Apache/2.2.22 (Debian)
Server built:   Jul 24 2014 15:34:03
<IfModule mpm_worker_module>
    StartServers          2
    MinSpareThreads      25
    MaxSpareThreads      75
    ThreadLimit          64
    ThreadsPerChild      25
    MaxClients          150
    MaxRequestsPerChild   0
</IfModule>

Server version: Apache/2.2.22 (Debian)
Server built:   Jul 24 2014 15:34:03
Server's Module Magic Number: 20051115:30
Server loaded:  APR 1.4.6, APR-Util 1.4.1
Compiled using: APR 1.4.6, APR-Util 1.4.1
Architecture:   64-bit
Server MPM:     Worker
  threaded:     yes (fixed thread count)
    forked:     yes (variable process count)
Server compiled with....
 -D APACHE_MPM_DIR="server/mpm/worker"
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=128
 -D HTTPD_ROOT="/etc/apache2"
 -D SUEXEC_BIN="/usr/lib/apache2/suexec"
 -D DEFAULT_PIDLOG="/var/run/apache2.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="mime.types"
 -D SERVER_CONFIG_FILE="apache2.conf"
 
Loaded Modules:
 core_module (static)
 log_config_module (static)
 logio_module (static)
 version_module (static)
 mpm_worker_module (static)
 http_module (static)
 so_module (static)
 actions_module (shared)
 alias_module (shared)
 auth_basic_module (shared)
 authn_file_module (shared)
 authz_default_module (shared)
 authz_groupfile_module (shared)
 authz_host_module (shared)
 authz_user_module (shared)
 autoindex_module (shared)
 cgid_module (shared)
 deflate_module (shared)
 dir_module (shared)
 env_module (shared)
 fcgid_module (shared)
 mime_module (shared)
 negotiation_module (shared)
 reqtimeout_module (shared)
 rewrite_module (shared)
 setenvif_module (shared)
 status_module (shared)
 suexec_module (shared)



Mysql: Mit der Config wie beim letzten, da hatte ich allerdings nur 8 GB RAM
mysql Ver 14.14 Distrib 5.5.40, for debian-linux-gnu (x86_64) using readline 6.2
Mysqltuner + Primer

Code: Select all

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

MySQL Version 5.5.40-0+wheezy1-log x86_64

Uptime = 2 days 1 hrs 10 min 25 sec
Avg. qps = 24
Total Questions = 4392181
Threads Connected = 4

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.5/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 = 0.500000 sec.
You have 9253 out of 4392202 that take longer than 0.500000 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.5/en/point-in-time-recovery.html

WORKER THREADS
Current thread_cache_size = 80
Current threads_cached = 44
Current threads_per_sec = 0
Historic threads_per_sec = 0
Your thread_cache_size is fine

MAX CONNECTIONS
Current max_connections = 150
Current threads_connected = 4
Historic max_used_connections = 48
The number of used connections is 32% of the configured maximum.
Your max_connections variable seems to be fine.

INNODB STATUS
Current InnoDB index space = 16 M
Current InnoDB data space = 210 M
Current InnoDB buffer pool free = 94 %
Current innodb_buffer_pool_size = 4.00 G
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 : 4.72 G
Configured Max Per-thread Buffers : 684 M
Configured Max Global Buffers : 4.51 G
Configured Max Memory Limit : 5.18 G
Physical Memory : 15.44 G
Max memory limit seem to be within acceptable norms

KEY BUFFER
Current MyISAM index space = 93 M
Current key_buffer_size = 256 M
Key cache miss rate is 1 : 1811
Key buffer free ratio = 76 %
Your key_buffer_size seems to be fine

QUERY CACHE
Query cache is enabled
Current query_cache_size = 256 M
Current query_cache_used = 155 M
Current query_cache_limit = 4 M
Current Query cache Memory fill ratio = 60.54 %
Current query_cache_min_res_unit = 9 K
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 = 2.00 M
You have had 2 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 = 32768 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 = 8192 tables
Current table_definition_cache = 8192 tables
You have a total of 1313 tables
You have 2294 open tables.
The table_cache value seems to be fine

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

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

 >>  MySQLTuner 1.4.0 - Major Hayden <major@mhtx.net>
 >>  Bug reports, feature requests, and downloads at http://mysqltuner.com/
 >>  Run with '--help' for additional options and output filtering
[OK] Logged in using credentials from debian maintenance account.
[OK] Currently running supported MySQL version 5.5.40-0+wheezy1-log
[OK] Operating on 64-bit architecture

-------- Storage Engine Statistics -------------------------------------------
[--] Status: +ARCHIVE +BLACKHOLE +CSV -FEDERATED +InnoDB +MRG_MYISAM
[--] Data in MyISAM tables: 556M (Tables: 1004)
[--] Data in InnoDB tables: 210M (Tables: 257)
[--] Data in CSV tables: 0B (Tables: 2)
[--] Data in PERFORMANCE_SCHEMA tables: 0B (Tables: 17)
[--] Data in MEMORY tables: 248K (Tables: 9)
[!!] Total fragmented tables: 307

-------- Security Recommendations  -------------------------------------------
[OK] All database users have passwords assigned

-------- Performance Metrics -------------------------------------------------
[--] Up for: 2d 1h 9m 22s (4M q [24.806 qps], 114K conn, TX: 28B, RX: 804M)
[--] Reads / Writes: 77% / 23%
[--] Total buffers: 4.6G global + 4.6M per thread (150 max threads)
[OK] Maximum possible memory usage: 5.3G (34% of installed RAM)
[OK] Slow queries: 0% (9K/4M)
[OK] Highest usage of available connections: 32% (48/150)
[OK] Key buffer size / total MyISAM indexes: 256.0M/93.4M
[OK] Key buffer hit rate: 99.9% (27M cached / 15K reads)
[OK] Query cache efficiency: 65.6% (2M cached / 3M selects)
[!!] Query cache prunes per day: 70276
[OK] Sorts requiring temporary tables: 0% (68 temp sorts / 173K sorts)
[!!] Temporary tables created on disk: 59% (43K on disk / 73K total)
[OK] Thread cache hit rate: 99% (48 created / 114K connections)
[OK] Table cache hit rate: 24% (2K open / 9K opened)
[OK] Open file limit used: 8% (2K/32K)
[OK] Table locks acquired immediately: 99% (1M immediate / 1M locks)
[OK] InnoDB buffer pool / data size: 4.0G/210.8M
[OK] InnoDB log waits: 0
-------- Recommendations -----------------------------------------------------
General recommendations:
    Run OPTIMIZE TABLE to defragment tables for better performance
    Increasing the query_cache size over 128M may reduce performance
    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 (> 256M) [see warning above]
    tmp_table_size (> 128M)
    max_heap_table_size (> 128M)
Der eine Mag das eine und andere! - Rund um Affiliate Blogs ;)

User avatar
Joe User
Project Manager
Project Manager
Posts: 11599
Joined: 2003-02-27 01:00
Location: Hamburg

Re: SWAP / Kernel Panic Error ?

Post by Joe User » 2015-01-10 13:55

Schaut soweit Alles gut aus.

Optimieren lässt sich allerdings noch die WebApp welche für die vielen TEXT/BLOB-Felder verantwortlich ist, aber das können wir hier im Forum nicht leisten, das muss der Hersteller der WebApp machen.

Am Kernel solltest Du besser nicht rumfummeln, ausser Du weisst ganz genau was Du machst. Falls Debian SeLinux unterstützt, lässt sich auch damit viel erreichen. Aber auch hier gilt: Finger weg, wenn Du nicht genau weisst, was Du da machst.

Grundsätzlich helfen alle Security-Features nix, wenn schon die Grundkonfiguration des Systems, der Dienste und der WebApps nicht vernünftig durchgeführt wurde. Ebeno wichtig sind das zeitnahe Einspielen aller verfügbaren Updates für alle Pakete (und WebApps inklusive Plugins) und regelmässiges kontrollieren/korrigieren/aktualisieren der Konfigurationen. Darüberhinaus gehört jedes nicht genutzte Paket deinstalliert und jede ungenutzte Funktion deaktiviert.
Das Alles zusammen ist effektiver als Grsec, SeLinux oder sonstige Security-Features. Letztere sind lediglich das I-Tüpfelchen obendrauf.
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.

chongs45
Posts: 6
Joined: 2015-01-01 17:01
Location: Bad X-Nach

Re: SWAP / Kernel Panic Error ?

Post by chongs45 » 2015-01-10 14:13

Ok das hört sich doch mal gut an, mit den Seetings der WebApps muss ich mal schauen.
Ich habe ja 51 Wordpress auf dem Server liegen und halte die immer aktuell, was mir halt auf gefallen ist das Wordpress vom Mysim komplett auf InnoDB umgeschwenkt hat, da könnte ich die Apps da noch die Enegie ändern und auf InnoDB laufen lassen.

Probleme machen halt immer solche Abfragen:

Code: Select all

SELECT user_id, meta_key, meta_value FROM wp6_usermeta WHERE user_id IN (1) ORDER BY umeta_id ASC;
id    select_type    table    type    possible_keys    key    key_len    ref    rows    Extra
1    SIMPLE    wp6_usermeta    ALL    user_id    NULL    NULL    NULL    29    Using where; Using filesort


Unter Mysim nimmt er nicht mal ein Index an und benutzt filesort, unter InnoDB fällt das weg! Problem ist hier "meta_value" da ist die Tabelle auf Text/Blob steht und da alle Details drinne stehen. Leider habe ich vom Deutschen WP nur die Info erhalten mal umzustellen auf InnoDB.

Ok danke für deinen Ratschlag und Infos.

mfg
ch45
Der eine Mag das eine und andere! - Rund um Affiliate Blogs ;)

chongs45
Posts: 6
Joined: 2015-01-01 17:01
Location: Bad X-Nach

SWAP am Limit

Post by chongs45 » 2015-12-22 16:07

Hi,

nach dem ja fast 12 Monate Ruhe war, ist mein SWAP mal wieder über die hälfte aufgebraucht.
An den Webapps konnte ich als php/sql Leihe nicht viel Schrauben, das Mysql aber 40% auf SWAP auslagert ist dennoch nicht normal?

System:
Intel(R) Core(TM) i5-2400 CPU @ 3.10GHz, 16 GB RAM
Debian 3.16.7-ckt11-1+deb8u3 (2015-08-04) x86_64 GNU/Linux

Hier mal ein paar Ausgaben:
top

Code: Select all

top - 15:47:18 up 106 days, 19:35,  2 users,  load average: 0,61, 0,54, 0,54
Tasks: 1005 total,   1 running, 1004 sleeping,   0 stopped,   0 zombie
%Cpu(s):  7,0 us,  0,6 sy,  0,0 ni, 87,2 id,  5,2 wa,  0,0 hi,  0,0 si,  0,0 st
KiB Mem:  16187524 total, 12418336 used,  3769188 free,   762232 buffers
KiB Swap:  7806904 total,  5692684 used,  2114220 free.  6550808 cached Mem


free

Code: Select all

             total       used       free     shared    buffers     cached
Mem:      16187524   12476944    3710580    5130268     762232    6586888
-/+ buffers/cache:    5127824   11059700
Swap:      7806904    5692684    2114220


Inhalt des SWAP (Auszug)

Code: Select all

Overall swap used: 5066672
PID=17624 - Swap used: 16 - (php5-cgi )
PID=17741 - Swap used: 28 - (php5-cgi )
PID=17627 - Swap used: 32 - (php5-cgi )
PID=17806 - Swap used: 32 - (php5-cgi )
PID=28664 - Swap used: 32 - (authdaemond )
PID=17739 - Swap used: 36 - (php5-cgi )
PID=28669 - Swap used: 36 - (couriertcpd )
PID=17362 - Swap used: 44 - (php5-cgi )
PID=28668 - Swap used: 44 - (courierlogger )
PID=747 - Swap used: 44 - (cron )
PID=17355 - Swap used: 48 - (php5-cgi )
PID=17422 - Swap used: 48 - (php5-cgi )
PID=17742 - Swap used: 48 - (php5-cgi )
PID=28656 - Swap used: 48 - (courierlogger )
PID=17457 - Swap used: 56 - (php5-cgi )
PID=17809 - Swap used: 56 - (php5-cgi )
PID=28657 - Swap used: 56 - (couriertcpd )
PID=28660 - Swap used: 64 - (authdaemond )
PID=28661 - Swap used: 68 - (authdaemond )
PID=28662 - Swap used: 68 - (authdaemond )
PID=28663 - Swap used: 68 - (authdaemond )
PID=28649 - Swap used: 80 - (authdaemond )
PID=32012 - Swap used: 88 - (ispcp_daemon )
PID=5514 - Swap used: 92 - ((sd-pam) )
PID=1 - Swap used: 96 - (systemd )
PID=28648 - Swap used: 96 - (courierlogger )
PID=11514 - Swap used: 100 - (varnishlog )
PID=11561 - Swap used: 108 - (varnishncsa )
PID=866 - Swap used: 112 - (irqbalance )
PID=326 - Swap used: 116 - (mdadm )
PID=17789 - Swap used: 124 - (php5-cgi )
PID=789 - Swap used: 144 - (acpid )
PID=17275 - Swap used: 148 - (php5-cgi )
PID=11757 - Swap used: 152 - (mysqld_safe )
PID=749 - Swap used: 152 - (atd )
PID=754 - Swap used: 152 - (systemd-logind )
PID=792 - Swap used: 152 - (agetty )
PID=17241 - Swap used: 160 - (php5-cgi )
PID=203 - Swap used: 176 - (systemd-journal )
PID=746 - Swap used: 212 - (rpc.idmapd )
PID=723 - Swap used: 232 - (rpcbind )
PID=756 - Swap used: 260 - (dbus-daemon )
PID=17808 - Swap used: 264 - (php5-cgi )
PID=17626 - Swap used: 268 - (php5-cgi )
PID=17895 - Swap used: 280 - (php5-cgi )
PID=17893 - Swap used: 296 - (php5-cgi )
PID=752 - Swap used: 308 - (rsyslogd )
PID=17697 - Swap used: 340 - (php5-cgi )
PID=17919 - Swap used: 364 - (php5-cgi )
PID=17918 - Swap used: 372 - (php5-cgi )
PID=14020 - Swap used: 384 - (varnishd )
PID=1973 - Swap used: 428 - (master )
PID=17371 - Swap used: 1860 - (php5-cgi )
PID=17708 - Swap used: 1860 - (php5-cgi )
PID=17199 - Swap used: 2312 - (php5-cgi )
PID=17196 - Swap used: 2316 - (php5-cgi )
PID=17412 - Swap used: 2340 - (php5-cgi )
PID=17372 - Swap used: 2524 - (php5-cgi )
PID=750 - Swap used: 2524 - (freshclam )
PID=17424 - Swap used: 2756 - (php5-cgi )
PID=17702 - Swap used: 3168 - (php5-cgi )
PID=14021 - Swap used: 3176 - (varnishd )
PID=9209 - Swap used: 18376 - (php5-cgi )
PID=16619 - Swap used: 18408 - (php5-cgi )
PID=14578 - Swap used: 19192 - (php5-cgi )
PID=9407 - Swap used: 19268 - (php5-cgi )
PID=14535 - Swap used: 19424 - (php5-cgi )
PID=6198 - Swap used: 19616 - (php5-cgi )
PID=5740 - Swap used: 20216 - (php5-cgi )
PID=16255 - Swap used: 20320 - (php5-cgi )
PID=14539 - Swap used: 20544 - (php5-cgi )
PID=16254 - Swap used: 21448 - (php5-cgi )
PID=5234 - Swap used: 21480 - (php5-cgi )
PID=13985 - Swap used: 21560 - (php5-cgi )
PID=5233 - Swap used: 21608 - (php5-cgi )
PID=5238 - Swap used: 21608 - (php5-cgi )
PID=13984 - Swap used: 21668 - (php5-cgi )
PID=9884 - Swap used: 22112 - (php5-cgi )
PID=14538 - Swap used: 22252 - (php5-cgi )
PID=9208 - Swap used: 22592 - (php5-cgi )
PID=5229 - Swap used: 22668 - (php5-cgi )
PID=5239 - Swap used: 22724 - (php5-cgi )
PID=28613 - Swap used: 49732 - (named )
PID=12301 - Swap used: 316516 - (mysqld )


sysctl vm.swappiness

Code: Select all

vm.swappiness = 15


swapon

Code: Select all

 swapon -s
Filename                                Type            Size    Used    Priority
/dev/md0                                partition       7806904 5692676 -1


tuner-mysql

Code: Select all

MySQL Version 5.5.44-0+deb8u1-log x86_64

Uptime = 93 days 5 hrs 51 min 21 sec
Avg. qps = 45
Total Questions = 364828641
Threads Connected = 2

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.5/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 = 10.000000 sec.
You have 1068197 out of 364828662 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.5/en/point-in-time-recovery.html

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

INNODB STATUS
Current InnoDB index space = 21 M
Current InnoDB data space = 370 M
Current InnoDB buffer pool free = 90 %
Current innodb_buffer_pool_size = 4.00 G
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 : 4.70 G
Configured Max Per-thread Buffers : 456 M
Configured Max Global Buffers : 4.51 G
Configured Max Memory Limit : 4.96 G
Physical Memory : 15.43 G
Max memory limit seem to be within acceptable norms

KEY BUFFER
Current MyISAM index space = 99 M
Current key_buffer_size = 256 M
Key cache miss rate is 1 : 41118
Key buffer free ratio = 74 %
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 = 256 M
Current query_cache_used = 173 M
Current query_cache_limit = 4 M
Current Query cache Memory fill ratio = 67.94 %
Current query_cache_min_res_unit = 9 K
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 = 2.00 M
You have had 442 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 = 32768 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 = 8192 tables
Current table_definition_cache = 8192 tables
You have a total of 1342 tables
You have 2948 open tables.
The table_cache value seems to be fine

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

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


Mysql-Tunning

Code: Select all

[OK] Logged in using credentials from debian maintenance account.
 >>  MySQLTuner 1.6.1 - Major Hayden <major@mhtx.net>
 >>  Bug reports, feature requests, and downloads at http://mysqltuner.com/
 >>  Run with '--help' for additional options and output filtering
[--] Skipped version check for MySQLTuner script
[OK] Currently running supported MySQL version 5.5.44-0+deb8u1-log
[OK] Operating on 64-bit architecture

-------- Storage Engine Statistics -------------------------------------------
[--] Status: +ARCHIVE +BLACKHOLE +CSV -FEDERATED +InnoDB +MRG_MYISAM
[--] Data in MyISAM tables: 678M (Tables: 1008)
[--] Data in InnoDB tables: 391M (Tables: 282)
[--] Data in CSV tables: 0B (Tables: 2)
[--] Data in MEMORY tables: 1M (Tables: 9)
[!!] Total fragmented tables: 366
-------- Security Recommendations  -------------------------------------------
[OK] There are no anonymous accounts for any database users
[OK] All database users have passwords assigned
-------- Performance Metrics -------------------------------------------------
[--] Up for: 93d 5h 54m 2s (364M q [45.285 qps], 12M conn, TX: 2263B, RX: 50B)
[--] Reads / Writes: 86% / 14%
[--] Binary logging is disabled
[--] Total buffers: 4.6G global + 4.6M per thread (100 max threads)
[OK] Maximum reached memory usage: 4.8G (30.87% of installed RAM)
[OK] Maximum possible memory usage: 5.0G (32.54% of installed RAM)
[OK] Slow queries: 0% (1M/364M)
[OK] Highest usage of available connections: 42% (42/100)
[!!] Aborted connections: 14.05%  (1735425/12356098)
[OK] Query cache efficiency: 76.8% (243M cached / 316M selects)
[!!] Query cache prunes per day: 118725
[OK] Sorts requiring temporary tables: 0% (2K temp sorts / 9M sorts)
[!!] Temporary tables created on disk: 68% (4M on disk / 6M total)
[OK] Thread cache hit rate: 99% (42 created / 12M connections)
[OK] Table cache hit rate: 21% (2K open / 13K opened)
[OK] Open file limit used: 9% (3K/32K)
[OK] Table locks acquired immediately: 99% (87M immediate / 87M locks)

-------- MyISAM Metrics -----------------------------------------------------
[!!] Key buffer used: 25.2% (67M used / 268M cache)
[OK] Key buffer size / total MyISAM indexes: 256.0M/99.0M
[OK] Read Key buffer hit rate: 100.0% (3B cached / 83K reads)
[!!] Write Key buffer hit rate: 83.0% (21M cached / 3M writes)

-------- InnoDB Metrics -----------------------------------------------------
[--] InnoDB is enabled.
[OK] InnoDB buffer pool / data size: 4.0G/391.9M
[OK] InnoDB buffer pool instances: 4
[!!] InnoDB Used buffer: 9.59% (25133 used/ 262140 total)
[OK] InnoDB Read buffer efficiency: 100.00% (1085995547 hits/ 1086007988 total)
[!!] InnoDB Write buffer efficiency: 0.00% (0 hits/ 1 total)
[OK] InnoDB log waits: 0.00% (0 waits / 6546574 writes)

-------- AriaDB Metrics -----------------------------------------------------
[--] AriaDB is disabled.

-------- Replication Metrics -------------------------------------------------
[--] No replication slave(s) for this server.
[--] This is a standalone server..

-------- Recommendations -----------------------------------------------------
General recommendations:
    Run OPTIMIZE TABLE to defragment tables for better performance
    Reduce or eliminate unclosed connections and network issues
    Increasing the query_cache size over 128M may reduce performance
    When making adjustments, make tmp_table_size/max_heap_table_size equal
    Reduce your SELECT DISTINCT queries which have no LIMIT clause
Variables to adjust:
    query_cache_size (> 256M) [see warning above]
    tmp_table_size (> 64M)
    max_heap_table_size (> 128M)


my.cnf

Code: Select all

[mysqld]
#
# * 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
tmpdir          = /var/tmp/mysql
lc-messages-dir = /usr/share/mysql
skip-external-locking
low_priority_updates =1
#
# 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
#
key_buffer_size         = 256M
join_buffer_size        = 2M
myisam_sort_buffer_size = 64M

# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover          = FORCE,BACKUP
max_connections         = 100
max_heap_table_size     = 128M
tmp_table_size          = 64M
max_allowed_packet      = 128M
open_files_limit        = 32768
table_cache             = 8192
table_definition_cache  = 8192
thread_concurrency      = 4
thread_cache_size       = 80
thread_stack            = 192K
#
# * Query Cache Configuration
#
query_cache_limit       = 4M
query_cache_size        = 256M
query_cache_type        = 1
query_cache_min_res_unit  = 9K
# * InnoDB
innodb_buffer_pool_size         = 4G
innodb_buffer_pool_instances    = 4
[mysqldump]
quick
quote-names
max_allowed_packet      = 128M
#key_buffer_size         = 128M

[mysql]
#no-auto-rehash # faster start of mysql but no tab completition


[myisamchk]
key_buffer_size = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M

[isamchk]
key_buffer              = 256M


Ideen wo ich noch was Optimieren kann?

Danke
ch45
Der eine Mag das eine und andere! - Rund um Affiliate Blogs ;)

User avatar
Joe User
Project Manager
Project Manager
Posts: 11599
Joined: 2003-02-27 01:00
Location: Hamburg

Re: SWAP / Kernel Panic Error ?

Post by Joe User » 2015-12-27 01:35

An MySQL liegt es nicht, MySQL zeigt nur das Problem am Deutlichsten auf.

Irgendetwas frisst da massig RAM und zwingt andere Prozesse in den Swap.

Eine nach RES sortierte Ausgabe von top wäre hilfreich und dazu auch von ps
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.