Апну некропост.
Поставил себе TokuDB, Репа марии для Centos 7 + jemalloc
Из особенностей: почему-то все временные таблички создает на диске. пришлось добавить
tmpdir = /dev/shm
Сжатие, используется LZMA:
Код:
Type: TokuDB
Name: ft: uncompressed / compressed bytes written (leaf)
Status: 5.344320
*************************** 111. row ***************************
Type: TokuDB
Name: ft: uncompressed / compressed bytes written (nonleaf)
Status: 5.449396
*************************** 112. row ***************************
Type: TokuDB
Name: ft: uncompressed / compressed bytes written (overall)
Status: 5.368150
ПЯТИКРАТНОЕ!
query_cache выпилен, так как в последних версиях он используется только для myisam.
Настройки:
Код:
tokudb_directio = 1
tokudb_cache_size = 2G
tokudb_loader_memory_size = 256M
tokudb_pk_insert_mode = 2
tokudb_row_format = tokudb_lzma
Селекты быстрые:
Код:
# User@Host: bgserver[bgserver] @ [172.16.20.9]
# Thread_id: 71 Schema: bgbilling QC_hit: No
# Query_time: 0.000204 Lock_time: 0.000029 Rows_sent: 1 Rows_examined: 3
SET timestamp=1486390174;
SELECT serv.*, serv.title as title, serv_type.title AS typeTitle, device.title AS deviceTitle, interface.title AS interfaceTitle FROM inet_serv_1 AS serv LEFT JOIN inet_serv_type_1 AS serv_type ON serv.typeId=serv_type.id LEFT JOIN inet_device_tree_1 AS device ON serv.deviceId=device.id LEFT JOIN inv_device_port_1 as interface ON interface.deviceId=device.invDeviceId AND interface.port=serv.interfaceId WHERE serv.contractId=458;
А вот удаления не очень
Код:
# User@Host: bgserver[bgserver] @ [172.16.20.9]
# Thread_id: 1 Schema: bgbilling QC_hit: No
# Query_time: 0.023724 Lock_time: 0.000058 Rows_sent: 0 Rows_examined: 194
SET timestamp=1486390174;
DELETE FROM periodic_errors WHERE marker='5' AND calc_date='2017-02-01';
Иногда встречается вот такая ахинея, но редко (2 за 2-е суток работы), обычно меньше 0.01
Код:
# User@Host: bgserver[bgserver] @ [172.16.20.9]
# Thread_id: 3006 Schema: bgbilling QC_hit: No
# Query_time: 4.013227 Lock_time: 0.001666 Rows_sent: 0 Rows_examined: 2
SET timestamp=1486393204;
INSERT INTO inet_session_log_1_201702 (id, connectionId, parentConnectionId, parentId, splittedId, deviceId, devicePort, agentDeviceId, acctSessionId, username, realm, type, servId, calledStationId, callingStationId, ipResourceId, ipAddress, connectionStart, sessionStart, sessionStop, lastActive, deviceState, deviceOptions, sessionTime, sessionCost, status) SELECT session.id, connection.id, connection.parentId, session.parentId, session.splittedId, connection.deviceId, connection.devicePort, connection.agentDeviceId, connection.acctSessionId, connection.username, null, connection.type, connection.servId, connection.calledStationId, connection.callingStationId, connection.ipResourceId, connection.ipAddress, connection.connectionStart, session.sessionStart, session.sessionStop, session.lastActive, session.deviceState, connection.deviceOptions, session.sessionTime, session.sessionCost, session.status FROM inet_session_1 as session LEFT JOIN inet_connection_1 as connection ON connection.id=session.connectionId AND connection.deviceId=1 WHERE session.id=6555846 AND session.connectionId=6146738;