Доброго дня,
Сегодня ночью мне пришло страшное письмо:
Код:
ID события: radius.wait.thread
Время регистрации события: 01.04.2015 00:00:17
В рамках отведенного переменными количества потоков threadCount=100 и размером очереди обработки maxQueueSize=500 RADIUS сервер не успеевает производить обработку аккаунтинг запросов.
Возможная причина - загруженность базы данных.
Radius:
accounting-requests per minute start: 1; stop: 3; update: 1316
access-requests per minute accept: 0; reject: 0
ignore per minute access-request: 0; accounting-update: 0
Stack trace:
"MySQL Statement Cancellation Timer" Id=16163 TIMED_WAITING on java.util.TaskQueue@14703cca
at java.lang.Object.wait(Native Method)
- waiting on java.util.TaskQueue@14703cca
at java.util.TimerThread.mainLoop(Timer.java:552)
at java.util.TimerThread.run(Timer.java:505)
Ровно в полночь на первое число... И вот теперь в логах (error.log) BGInetAccess:
Код:
connection 04-01/12:35:53 ERROR [sa-p-13-t-94] InetSaOptionsModifyEvent - Connection not found with id=474464
connection 04-01/12:58:48 ERROR [sa-p-13-t-93] InetSaStateModifyEvent - Connection not found with id=474983
connection 04-01/13:00:21 ERROR [sa-p-13-t-5] InetSaStateModifyEvent - Connection not found with id=472917
connection 04-01/14:14:46 ERROR [sa-p-13-t-83] InetSaStateModifyEvent - Connection not found with id=475217
connection 04-01/14:25:40 ERROR [sa-p-13-t-56] InetSaOptionsModifyEvent - Connection not found with id=472857
connection 04-01/14:30:15 ERROR [sa-p-13-t-88] InetSaStateModifyEvent - Connection not found with id=475268
connection 04-01/14:39:58 ERROR [sa-p-13-t-61] InetSaOptionsModifyEvent - Connection not found with id=472900
connection 04-01/14:45:20 ERROR [sa-p-13-t-21] InetSaOptionsModifyEvent - Connection not found with id=472873
connection 04-01/14:45:30 ERROR [sa-p-13-t-55] InetSaStateModifyEvent - Connection not found with id=472809
connection 04-01/15:14:35 ERROR [sa-p-13-t-63] InetSaStateModifyEvent - Connection not found with id=473131
Ошибок много и они не прекращаются.
Похоже вопрос производительности, поэтому прошу помочь советов с тюнингом параметров.
Количество абонентов онлайн приближается к 1000. Количество свичей - 400. Не так уж и много.... У многих гораздо больше, посоветуйте что-нибудь, пожалуйста.
BGInetAccess:
Код:
./access_status.sh
Java Runtime: Oracle Corporation Java HotSpot(TM) 64-Bit Server VM [1.7.0_65] /opt/java/jdk1.7.0_65/jre
Java endorsed dirs: /lib/endorsed:/opt/java/jdk/lib/endorsed
OS: Linux 3.2.0-4-amd64 [amd64], file.encoding: UTF-8, user.name: root
Heap sizes: current=123392k free=122080k max=1824256k
Kernel version 6.1.1047 / 04.03.2015 19:50:23
Inet version 6.1.661 / 05.03.2015 19:12:18
Radius:
accounting-requests per minute start: 0; stop: 0; update: 0
access-requests per minute accept: 0; reject: 0
ignore per minute access-request: 0; accounting-update: 0
Antispam ban count: 0; used per minute: 0
Started: 10.03.2015 10:32:30 Uptime: 22 d 03:36:40
Memory total: 192 413 696; max: 954 728 448; free: 8 268 840
Memory pools:
Non-heap memory[Code Cache]: max: 50 331 648; used: 8 853 568; peek: 9 034 496
Heap memory[PS Eden Space]: max: 357 040 128; used: 131 912; peek: 325 582 848
Heap memory[PS Survivor Space]: max: 524 288; used: 163 840; peek: 119 009 248
Heap memory[PS Old Gen]: max: 715 653 120; used: 183 852 032; peek: 554 713 168
Non-heap memory[PS Perm Gen]: max: 85 983 232; used: 32 485 768; peek: 32 510 648
Thread count: 639
Trees in cache: 0
Connections pool to Master status Idle: 20; Active: 0; maxActive: 300; maxIdle: 20
BGInetAccess:
Код:
./accounting_status.sh
Java Runtime: Oracle Corporation Java HotSpot(TM) 64-Bit Server VM [1.7.0_65] /opt/java/jdk1.7.0_65/jre
Java endorsed dirs: /lib/endorsed:/opt/java/jdk/lib/endorsed
OS: Linux 3.2.0-4-amd64 [amd64], file.encoding: UTF-8, user.name: root
Heap sizes: current=123392k free=122736k max=1824256k
Kernel version 6.1.1047 / 04.03.2015 19:50:23
Inet version 6.1.661 / 05.03.2015 19:12:18
Radius:
accounting-requests per minute start: 3; stop: 0; update: 1339
access-requests per minute accept: 0; reject: 0
ignore per minute access-request: 0; accounting-update: 0
Started: 10.03.2015 10:32:37 Uptime: 22 d 03:53:55
Memory total: 103 809 024; max: 954 728 448; free: 32 674 936
Memory pools:
Non-heap memory[Code Cache]: max: 50 331 648; used: 9 043 072; peek: 9 053 568
Heap memory[PS Eden Space]: max: 357 040 128; used: 12 168 512; peek: 328 728 576
Heap memory[PS Survivor Space]: max: 524 288; used: 332 408; peek: 14 664 128
Heap memory[PS Old Gen]: max: 715 653 120; used: 58 639 040; peek: 90 872 320
Non-heap memory[PS Perm Gen]: max: 85 983 232; used: 32 590 704; peek: 32 608 448
Thread count: 159
Trees in cache: 0
Connections pool to Master status Idle: 20; Active: 1; maxActive: 300; maxIdle: 20
Код:
./mysqltuner.pl
-------- General Statistics --------------------------------------------------
[--] Skipped version check for MySQLTuner script
[OK] Currently running supported MySQL version 5.5.41-0+wheezy1-log
[OK] Operating on 64-bit architecture
-------- Storage Engine Statistics -------------------------------------------
[--] Status: +Archive -BDB -Federated +InnoDB -ISAM -NDBCluster
[--] Data in InnoDB tables: 2G (Tables: 581)
[--] Data in PERFORMANCE_SCHEMA tables: 0B (Tables: 17)
[!!] Total fragmented tables: 75
-------- Security Recommendations -------------------------------------------
[OK] All database users have passwords assigned
-------- Performance Metrics -------------------------------------------------
[--] Up for: 1d 4h 26m 18s (18M q [177.006 qps], 16K conn, TX: 3B, RX: 2B)
[--] Reads / Writes: 6% / 94%
[--] Total buffers: 3.1G global + 2.7M per thread (500 max threads)
[OK] Maximum possible memory usage: 4.4G (56% of installed RAM)
[OK] Slow queries: 0% (11K/18M)
[OK] Highest usage of available connections: 32% (162/500)
[OK] Key buffer size / total MyISAM indexes: 16.0M/97.0K
[OK] Key buffer hit rate: 100.0% (76K cached / 0 reads)
[OK] Query cache efficiency: 89.9% (5M cached / 6M selects)
[OK] Query cache prunes per day: 0
[OK] Sorts requiring temporary tables: 0% (0 temp sorts / 67K sorts)
[OK] Temporary tables created on disk: 1% (151 on disk / 13K total)
[OK] Thread cache hit rate: 97% (365 created / 16K connections)
[!!] Table cache hit rate: 17% (640 open / 3K opened)
[OK] Open file limit used: 0% (49/32K)
[OK] Table locks acquired immediately: 100% (72M immediate / 72M locks)
[OK] InnoDB data size / buffer pool: 2.2G/3.0G
-------- Recommendations -----------------------------------------------------
General recommendations:
Run OPTIMIZE TABLE to defragment tables for better performance
Increase table_cache gradually to avoid file descriptor limits
Variables to adjust:
table_cache (> 4096)
БД на отдельном сервере, activemq тоже отдельно.
Код:
Сервер: вер. 6.1.1047 / 04.03.2015 19:50:23
os: Linux; java: Java HotSpot(TM) 64-Bit Server VM, v.1.7.0_65
card: вер. 6.1.204 / 04.03.2015 19:50:22
inet: вер. 6.1.661 / 05.03.2015 19:12:18
npay: вер. 6.1.184 / 11.02.2015 04:02:21
reports: вер. 6.1.196 / 08.02.2015 20:45:22
subscription: вер. 6.1.30 / 08.02.2015 20:45:31