forked from mtusi2026/mtusi2026lab2
Перенести мессенджер в PostgreSQL и сессии в Redis.
Подтверждённые сообщения и действующие сессии переживают перезапуск, история читается по индексу, копия восстанавливается в новый том.
This commit is contained in:
@@ -0,0 +1,87 @@
|
||||
{
|
||||
"platform": "Windows-10-10.0.26100-SP0",
|
||||
"processor": "Intel64 Family 6 Model 154 Stepping 3, GenuineIntel",
|
||||
"python": "3.11.5",
|
||||
"seed_seconds": 2.356,
|
||||
"chat_sizes_head": [
|
||||
80000,
|
||||
4000,
|
||||
4000,
|
||||
4000,
|
||||
4000,
|
||||
300,
|
||||
300,
|
||||
300
|
||||
],
|
||||
"chat_count": 155,
|
||||
"smallest_chat": 1,
|
||||
"largest_chat": 80000,
|
||||
"source": {
|
||||
"users": 3,
|
||||
"chats": 155,
|
||||
"chat_members": 165,
|
||||
"messages": 100100,
|
||||
"version": "PostgreSQL 16.8 (Debian 16.8-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit",
|
||||
"synchronous_commit": "on",
|
||||
"fsync": "on",
|
||||
"shared_buffers": "128MB"
|
||||
},
|
||||
"restored": {
|
||||
"users": 3,
|
||||
"chats": 155,
|
||||
"chat_members": 165,
|
||||
"messages": 100100
|
||||
},
|
||||
"counts_match": true,
|
||||
"samples_match": {
|
||||
"huge_first": true,
|
||||
"huge_middle": true,
|
||||
"huge_last": true,
|
||||
"medium": true,
|
||||
"tiny": true
|
||||
},
|
||||
"dump_seconds": 0.477,
|
||||
"dump_bytes": 3094487,
|
||||
"restore_seconds": 0.61,
|
||||
"create_index_ms": 71.9,
|
||||
"write_cost": {
|
||||
"rows": 2000,
|
||||
"with_history_index_ms": 31.8,
|
||||
"without_secondary_index_ms": 27.6
|
||||
},
|
||||
"keyset": {
|
||||
"scan": "-> Index Scan using messages_chat_history_idx on messages (cost=0.42..6377.26 rows=32040 width=66) (actual time=0.008..0.015 rows=50 loops=1)",
|
||||
"buffers": "Buffers: shared hit=6",
|
||||
"execution_time": "Execution Time: 0.027 ms",
|
||||
"planning_time": "Planning Time: 0.046 ms"
|
||||
},
|
||||
"offset": {
|
||||
"scan": "-> Index Scan using messages_chat_history_idx on messages (cost=0.42..8739.72 rows=80287 width=66) (actual time=0.008..3.212 rows=40050 loops=1)",
|
||||
"buffers": "Buffers: shared hit=788",
|
||||
"execution_time": "Execution Time: 4.180 ms",
|
||||
"planning_time": "Planning Time: 0.037 ms"
|
||||
},
|
||||
"seqscan": {
|
||||
"scan": "-> Seq Scan on messages (cost=0.00..2999.75 rows=3408 width=66) (actual time=3.147..3.873 rows=1999 loops=1)",
|
||||
"buffers": "Buffers: shared hit=1248",
|
||||
"execution_time": "Execution Time: 3.986 ms",
|
||||
"planning_time": "Planning Time: 0.048 ms"
|
||||
},
|
||||
"created_only": {
|
||||
"scan": "-> Index Scan using messages_created_only_idx on messages (cost=0.29..8078.09 rows=3436 width=66) (actual time=0.015..0.053 rows=51 loops=1)",
|
||||
"buffers": "Buffers: shared hit=259",
|
||||
"execution_time": "Execution Time: 0.073 ms",
|
||||
"planning_time": "Planning Time: 0.051 ms"
|
||||
},
|
||||
"restored_keyset": {
|
||||
"scan": "-> Index Scan using messages_chat_history_idx on messages (cost=0.42..6254.08 rows=31611 width=66) (actual time=0.009..0.016 rows=50 loops=1)",
|
||||
"buffers": "Buffers: shared hit=6",
|
||||
"execution_time": "Execution Time: 0.027 ms",
|
||||
"planning_time": "Planning Time: 0.045 ms"
|
||||
},
|
||||
"restored_message_indexes": [
|
||||
"messages_chat_history_idx",
|
||||
"messages_pkey"
|
||||
],
|
||||
"dump_file": "backups/messenger_bench.dump"
|
||||
}
|
||||
Reference in New Issue
Block a user