1939 lines
52 KiB
JSON
1939 lines
52 KiB
JSON
{
|
|
"label": "restore",
|
|
"status": "complete",
|
|
"started_at": "2026-10-02T04:25:27+00:00",
|
|
"command": "uv run python bench/run.py --profile restore --label restore",
|
|
"git": {
|
|
"commit": "67cb4d7",
|
|
"dirty": false
|
|
},
|
|
"overrides": {},
|
|
"host_state": {
|
|
"start": {
|
|
"swap_used_mib": 0.0,
|
|
"swap_total_mib": 0.0,
|
|
"memory_free_percent": 79,
|
|
"power": "AC Power",
|
|
"battery_percent": 80
|
|
},
|
|
"end": {
|
|
"swap_used_mib": 0.0,
|
|
"swap_total_mib": 0.0,
|
|
"memory_free_percent": 75,
|
|
"power": "AC Power",
|
|
"battery_percent": 80
|
|
},
|
|
"slept_seconds": 0
|
|
},
|
|
"host_warnings": [],
|
|
"other_containers": [],
|
|
"app_image": {
|
|
"tag": "mtusi-messenger:bench",
|
|
"id": "sha256:879d4454baab524b6311b940e9bc16042f1dfc9d2b0c5f489a41a03be4677c63",
|
|
"versions": {
|
|
"python": "3.12.14",
|
|
"fastapi": "0.141.1",
|
|
"starlette": "1.7.0",
|
|
"pydantic": "2.13.5",
|
|
"uvicorn": "0.54.0",
|
|
"sqlalchemy": "2.1.1",
|
|
"asyncpg": "0.31.0",
|
|
"redis": "8.1.0"
|
|
}
|
|
},
|
|
"generator": {
|
|
"image": "grafana/k6:2.3.0@sha256:9c2dee7f8ed74d317e4027c06a10f169b625638189de8d4555d0b3486a5aeb34",
|
|
"version": "k6 v2.3.0 (commit/e088784614, go1.27.1, linux/arm64)"
|
|
},
|
|
"docker": {
|
|
"server": "29.8.1",
|
|
"vm_os": "Docker Desktop",
|
|
"vm_cpus": 12,
|
|
"vm_memory_gib": 7.7,
|
|
"cgroup": "2",
|
|
"logging_driver": "local"
|
|
},
|
|
"host": {
|
|
"os": "macOS 26.6.2",
|
|
"machine": "Apple M3 Pro",
|
|
"memory_gib": 18.0
|
|
},
|
|
"profile": {
|
|
"name": "restore",
|
|
"sizes": [
|
|
10000,
|
|
100000,
|
|
500000
|
|
],
|
|
"concurrency": [],
|
|
"repeats": 0,
|
|
"read_warmup_s": 0,
|
|
"read_measure_s": 0,
|
|
"write_warmup": 0,
|
|
"write_measure": 0,
|
|
"prefill_chunk": 25000,
|
|
"prefill_vus": 32,
|
|
"text_length": 64,
|
|
"page_limit": 50,
|
|
"walk_limit": 100,
|
|
"cursor_pool": 1000,
|
|
"members": 10,
|
|
"seed": 20260930,
|
|
"warmup_seed_shift": 1000003,
|
|
"generator_cpu_limit": 4.0,
|
|
"cpus": "1",
|
|
"memory": "2g",
|
|
"db_cpus": "4",
|
|
"db_memory": "3g",
|
|
"cache_cpus": "2",
|
|
"cache_memory": "512m",
|
|
"session_ttl_seconds": 21600,
|
|
"background": [
|
|
[
|
|
10,
|
|
5000
|
|
],
|
|
[
|
|
100,
|
|
400
|
|
],
|
|
[
|
|
1000,
|
|
10
|
|
]
|
|
],
|
|
"index_variants": [
|
|
[
|
|
"chat_only",
|
|
"(chat_id)"
|
|
],
|
|
[
|
|
"covering",
|
|
"(chat_id, created_at, id) INCLUDE (sender_id, text)"
|
|
]
|
|
],
|
|
"write_probe_rows": 20000,
|
|
"write_probe_repeats": 3,
|
|
"restore": true,
|
|
"restore_jobs": 4,
|
|
"restore_write_load": 5000,
|
|
"restore_write_vus": 10
|
|
},
|
|
"sizes": [
|
|
{
|
|
"size": 10000,
|
|
"messages_total": 110000,
|
|
"rss_before_mib": 87.6,
|
|
"rss_after_mib": 93.0,
|
|
"bytes_per_message": 51,
|
|
"prefill_seconds": 110.9,
|
|
"prefill_rate": 992,
|
|
"cursors": 99,
|
|
"maintenance_seconds": 0.2,
|
|
"messages_rows": 110000,
|
|
"messages_table_bytes": 17473536,
|
|
"messages_indexes_bytes": 15597568,
|
|
"db_bytes_per_message": 301,
|
|
"plans": [
|
|
{
|
|
"chat": "read 10k",
|
|
"chat_size": 10000,
|
|
"page": "first",
|
|
"after": 0,
|
|
"source": "app",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 46,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.063,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "read 10k",
|
|
"chat_size": 10000,
|
|
"page": "middle",
|
|
"after": 5000,
|
|
"source": "app",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 55,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.065,
|
|
"kind": "generic"
|
|
},
|
|
{
|
|
"chat": "read 10k",
|
|
"chat_size": 10000,
|
|
"page": "middle",
|
|
"after": 5000,
|
|
"source": "psql",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 55,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.024,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "read 10k",
|
|
"chat_size": 10000,
|
|
"page": "middle",
|
|
"after": 5000,
|
|
"source": "generic",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 55,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.022,
|
|
"kind": "generic"
|
|
},
|
|
{
|
|
"chat": "read 10k",
|
|
"chat_size": 10000,
|
|
"page": "middle",
|
|
"after": 5000,
|
|
"source": "or-cursor",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 4973,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.715,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "read 10k",
|
|
"chat_size": 10000,
|
|
"page": "middle",
|
|
"after": 5000,
|
|
"source": "no-index",
|
|
"node": "Seq Scan on messages",
|
|
"shared_hit": 2128,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 3.31,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "read 10k",
|
|
"chat_size": 10000,
|
|
"page": "middle",
|
|
"after": 5000,
|
|
"source": "chat_only",
|
|
"node": "Bitmap Heap Scan on messages",
|
|
"shared_hit": 2031,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 1.438,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "read 10k",
|
|
"chat_size": 10000,
|
|
"page": "middle",
|
|
"after": 5000,
|
|
"source": "covering",
|
|
"node": "Index Only Scan using bench_variant on messages",
|
|
"shared_hit": 5,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.013,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "read 10k",
|
|
"chat_size": 10000,
|
|
"page": "last",
|
|
"after": 9900,
|
|
"source": "app",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 53,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.055,
|
|
"kind": "generic"
|
|
},
|
|
{
|
|
"chat": "bg 5k",
|
|
"chat_size": 5000,
|
|
"page": "first",
|
|
"after": 0,
|
|
"source": "app",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 46,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.049,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 5k",
|
|
"chat_size": 5000,
|
|
"page": "middle",
|
|
"after": 2500,
|
|
"source": "app",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 50,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.051,
|
|
"kind": "generic"
|
|
},
|
|
{
|
|
"chat": "bg 5k",
|
|
"chat_size": 5000,
|
|
"page": "middle",
|
|
"after": 2500,
|
|
"source": "psql",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 50,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.025,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 5k",
|
|
"chat_size": 5000,
|
|
"page": "middle",
|
|
"after": 2500,
|
|
"source": "generic",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 50,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.025,
|
|
"kind": "generic"
|
|
},
|
|
{
|
|
"chat": "bg 5k",
|
|
"chat_size": 5000,
|
|
"page": "middle",
|
|
"after": 2500,
|
|
"source": "or-cursor",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 2431,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.36,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 5k",
|
|
"chat_size": 5000,
|
|
"page": "middle",
|
|
"after": 2500,
|
|
"source": "no-index",
|
|
"node": "Seq Scan on messages",
|
|
"shared_hit": 2128,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 2.936,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 5k",
|
|
"chat_size": 5000,
|
|
"page": "middle",
|
|
"after": 2500,
|
|
"source": "chat_only",
|
|
"node": "Bitmap Heap Scan on messages",
|
|
"shared_hit": 1867,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.903,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 5k",
|
|
"chat_size": 5000,
|
|
"page": "middle",
|
|
"after": 2500,
|
|
"source": "covering",
|
|
"node": "Index Only Scan using bench_variant on messages",
|
|
"shared_hit": 5,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.013,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 5k",
|
|
"chat_size": 5000,
|
|
"page": "last",
|
|
"after": 4900,
|
|
"source": "app",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 53,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.052,
|
|
"kind": "generic"
|
|
},
|
|
{
|
|
"chat": "bg 400",
|
|
"chat_size": 400,
|
|
"page": "first",
|
|
"after": 0,
|
|
"source": "app",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 53,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.081,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 400",
|
|
"chat_size": 400,
|
|
"page": "middle",
|
|
"after": 200,
|
|
"source": "app",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 49,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.076,
|
|
"kind": "generic"
|
|
},
|
|
{
|
|
"chat": "bg 400",
|
|
"chat_size": 400,
|
|
"page": "middle",
|
|
"after": 200,
|
|
"source": "psql",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 49,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.028,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 400",
|
|
"chat_size": 400,
|
|
"page": "middle",
|
|
"after": 200,
|
|
"source": "generic",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 49,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.03,
|
|
"kind": "generic"
|
|
},
|
|
{
|
|
"chat": "bg 400",
|
|
"chat_size": 400,
|
|
"page": "middle",
|
|
"after": 200,
|
|
"source": "or-cursor",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 238,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.066,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 400",
|
|
"chat_size": 400,
|
|
"page": "middle",
|
|
"after": 200,
|
|
"source": "no-index",
|
|
"node": "Seq Scan on messages",
|
|
"shared_hit": 2128,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 2.595,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 400",
|
|
"chat_size": 400,
|
|
"page": "middle",
|
|
"after": 200,
|
|
"source": "chat_only",
|
|
"node": "Bitmap Heap Scan on messages",
|
|
"shared_hit": 365,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.158,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 400",
|
|
"chat_size": 400,
|
|
"page": "middle",
|
|
"after": 200,
|
|
"source": "covering",
|
|
"node": "Index Only Scan using bench_variant on messages",
|
|
"shared_hit": 5,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.02,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 400",
|
|
"chat_size": 400,
|
|
"page": "last",
|
|
"after": 300,
|
|
"source": "app",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 54,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.069,
|
|
"kind": "generic"
|
|
},
|
|
{
|
|
"chat": "bg 10",
|
|
"chat_size": 10,
|
|
"page": "first",
|
|
"after": 0,
|
|
"source": "app",
|
|
"node": "Bitmap Heap Scan on messages",
|
|
"shared_hit": 13,
|
|
"shared_read": 0,
|
|
"rows": 10.0,
|
|
"time_ms": 0.031,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 10",
|
|
"chat_size": 10,
|
|
"page": "first",
|
|
"after": 0,
|
|
"source": "psql",
|
|
"node": "Bitmap Heap Scan on messages",
|
|
"shared_hit": 13,
|
|
"shared_read": 0,
|
|
"rows": 10.0,
|
|
"time_ms": 0.02,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 10",
|
|
"chat_size": 10,
|
|
"page": "first",
|
|
"after": 0,
|
|
"source": "generic",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 13,
|
|
"shared_read": 0,
|
|
"rows": 10.0,
|
|
"time_ms": 0.007,
|
|
"kind": "generic"
|
|
},
|
|
{
|
|
"chat": "bg 10",
|
|
"chat_size": 10,
|
|
"page": "first",
|
|
"after": 0,
|
|
"source": "no-index",
|
|
"node": "Seq Scan on messages",
|
|
"shared_hit": 2128,
|
|
"shared_read": 0,
|
|
"rows": 10.0,
|
|
"time_ms": 2.445,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 10",
|
|
"chat_size": 10,
|
|
"page": "first",
|
|
"after": 0,
|
|
"source": "chat_only",
|
|
"node": "Bitmap Heap Scan on messages",
|
|
"shared_hit": 12,
|
|
"shared_read": 0,
|
|
"rows": 10.0,
|
|
"time_ms": 0.019,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 10",
|
|
"chat_size": 10,
|
|
"page": "first",
|
|
"after": 0,
|
|
"source": "covering",
|
|
"node": "Index Only Scan using bench_variant on messages",
|
|
"shared_hit": 4,
|
|
"shared_read": 0,
|
|
"rows": 10.0,
|
|
"time_ms": 0.009,
|
|
"kind": "custom"
|
|
}
|
|
],
|
|
"rss_peak_mib": 151.1,
|
|
"write_cost": [
|
|
{
|
|
"variant": "app",
|
|
"columns": "(chat_id, created_at, id)",
|
|
"rows": 20000,
|
|
"messages": 110000,
|
|
"index_bytes": 6496256,
|
|
"index_bytes_per_message": 59.1,
|
|
"insert_us_per_message": [
|
|
5.67,
|
|
5.56,
|
|
5.76
|
|
],
|
|
"wal_bytes_per_message": [
|
|
666.4,
|
|
661.2,
|
|
660.3
|
|
],
|
|
"fpi_per_1000": [
|
|
42.5,
|
|
44.3,
|
|
44.4
|
|
],
|
|
"long_text": "ok"
|
|
},
|
|
{
|
|
"variant": "chat_only",
|
|
"columns": "(chat_id)",
|
|
"rows": 20000,
|
|
"messages": 110000,
|
|
"index_bytes": 835584,
|
|
"index_bytes_per_message": 7.6,
|
|
"insert_us_per_message": [
|
|
5.18,
|
|
5.28,
|
|
5.16
|
|
],
|
|
"wal_bytes_per_message": [
|
|
526.4,
|
|
526.4,
|
|
526.5
|
|
],
|
|
"fpi_per_1000": [
|
|
34.8,
|
|
35.0,
|
|
35.2
|
|
],
|
|
"long_text": "ok"
|
|
},
|
|
{
|
|
"variant": "covering",
|
|
"columns": "(chat_id, created_at, id) INCLUDE (sender_id, text)",
|
|
"rows": 20000,
|
|
"messages": 110000,
|
|
"index_bytes": 17465344,
|
|
"index_bytes_per_message": 158.8,
|
|
"insert_us_per_message": [
|
|
6.12,
|
|
5.91,
|
|
6.82
|
|
],
|
|
"wal_bytes_per_message": [
|
|
912.7,
|
|
912.5,
|
|
912.1
|
|
],
|
|
"fpi_per_1000": [
|
|
50.9,
|
|
51.0,
|
|
51.1
|
|
],
|
|
"long_text": "index row requires 12072 bytes, maximum size is 8191"
|
|
},
|
|
{
|
|
"variant": "none",
|
|
"columns": null,
|
|
"rows": 20000,
|
|
"messages": 110000,
|
|
"index_bytes": 0,
|
|
"index_bytes_per_message": 0.0,
|
|
"insert_us_per_message": [
|
|
4.68,
|
|
4.61,
|
|
4.53
|
|
],
|
|
"wal_bytes_per_message": [
|
|
417.2,
|
|
417.7,
|
|
417.7
|
|
],
|
|
"fpi_per_1000": [
|
|
31.2,
|
|
31.4,
|
|
31.6
|
|
],
|
|
"long_text": "ok"
|
|
}
|
|
],
|
|
"restore": {
|
|
"messages_before_backup": 110000,
|
|
"messages_at_dump_end": 110423,
|
|
"messages_source_end": 115001,
|
|
"messages_restored": 110132,
|
|
"messages_lost": 4869,
|
|
"lost_after_backup_chat": 1,
|
|
"load_written": 5000,
|
|
"load_failed": 0,
|
|
"load_in_backup": 132,
|
|
"tables_restored": {
|
|
"users": 11,
|
|
"chats": 1112,
|
|
"chat_members": 12232,
|
|
"sessions": 11,
|
|
"messages": 110132
|
|
},
|
|
"backup_bytes": 4690089,
|
|
"backup_bytes_per_message": 42.6,
|
|
"dump_seconds": 0.32,
|
|
"storage_seconds": 0.85,
|
|
"copy_seconds": 0.06,
|
|
"restore_seconds": 0.3,
|
|
"analyze_seconds": 0.14,
|
|
"verify_seconds": 0.51,
|
|
"api_ready_seconds": 1.55,
|
|
"rto_seconds": 2.9,
|
|
"pages_checked": 10,
|
|
"stale_chat_get": 200,
|
|
"stale_chat_post": 500,
|
|
"flushed_chat_get": 404,
|
|
"late_session": 401
|
|
}
|
|
},
|
|
{
|
|
"size": 100000,
|
|
"messages_total": 200000,
|
|
"rss_before_mib": 87.6,
|
|
"rss_after_mib": 93.9,
|
|
"bytes_per_message": 33,
|
|
"prefill_seconds": 201.0,
|
|
"prefill_rate": 995,
|
|
"cursors": 999,
|
|
"maintenance_seconds": 0.2,
|
|
"messages_rows": 200000,
|
|
"messages_table_bytes": 31596544,
|
|
"messages_indexes_bytes": 28827648,
|
|
"db_bytes_per_message": 302,
|
|
"plans": [
|
|
{
|
|
"chat": "read 100k",
|
|
"chat_size": 100000,
|
|
"page": "first",
|
|
"after": 0,
|
|
"source": "app",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 24,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.043,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "read 100k",
|
|
"chat_size": 100000,
|
|
"page": "middle",
|
|
"after": 50000,
|
|
"source": "app",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 50,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.059,
|
|
"kind": "generic"
|
|
},
|
|
{
|
|
"chat": "read 100k",
|
|
"chat_size": 100000,
|
|
"page": "middle",
|
|
"after": 50000,
|
|
"source": "psql",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 50,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.032,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "read 100k",
|
|
"chat_size": 100000,
|
|
"page": "middle",
|
|
"after": 50000,
|
|
"source": "generic",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 50,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.03,
|
|
"kind": "generic"
|
|
},
|
|
{
|
|
"chat": "read 100k",
|
|
"chat_size": 100000,
|
|
"page": "middle",
|
|
"after": 50000,
|
|
"source": "or-cursor",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 50488,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 7.379,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "read 100k",
|
|
"chat_size": 100000,
|
|
"page": "middle",
|
|
"after": 50000,
|
|
"source": "no-index",
|
|
"node": "Parallel Seq Scan on messages",
|
|
"shared_hit": 3882,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 6.795,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "read 100k",
|
|
"chat_size": 100000,
|
|
"page": "middle",
|
|
"after": 50000,
|
|
"source": "chat_only",
|
|
"node": "Parallel Seq Scan on messages",
|
|
"shared_hit": 3882,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 5.659,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "read 100k",
|
|
"chat_size": 100000,
|
|
"page": "middle",
|
|
"after": 50000,
|
|
"source": "covering",
|
|
"node": "Index Only Scan using bench_variant on messages",
|
|
"shared_hit": 5,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.019,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "read 100k",
|
|
"chat_size": 100000,
|
|
"page": "last",
|
|
"after": 99900,
|
|
"source": "app",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 54,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.047,
|
|
"kind": "generic"
|
|
},
|
|
{
|
|
"chat": "bg 5k",
|
|
"chat_size": 5000,
|
|
"page": "first",
|
|
"after": 0,
|
|
"source": "app",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 52,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.052,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 5k",
|
|
"chat_size": 5000,
|
|
"page": "middle",
|
|
"after": 2500,
|
|
"source": "app",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 52,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.055,
|
|
"kind": "generic"
|
|
},
|
|
{
|
|
"chat": "bg 5k",
|
|
"chat_size": 5000,
|
|
"page": "middle",
|
|
"after": 2500,
|
|
"source": "psql",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 52,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.025,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 5k",
|
|
"chat_size": 5000,
|
|
"page": "middle",
|
|
"after": 2500,
|
|
"source": "generic",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 52,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.026,
|
|
"kind": "generic"
|
|
},
|
|
{
|
|
"chat": "bg 5k",
|
|
"chat_size": 5000,
|
|
"page": "middle",
|
|
"after": 2500,
|
|
"source": "or-cursor",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 2430,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.416,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 5k",
|
|
"chat_size": 5000,
|
|
"page": "middle",
|
|
"after": 2500,
|
|
"source": "no-index",
|
|
"node": "Parallel Seq Scan on messages",
|
|
"shared_hit": 3882,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 5.168,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 5k",
|
|
"chat_size": 5000,
|
|
"page": "middle",
|
|
"after": 2500,
|
|
"source": "chat_only",
|
|
"node": "Bitmap Heap Scan on messages",
|
|
"shared_hit": 2825,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 1.289,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 5k",
|
|
"chat_size": 5000,
|
|
"page": "middle",
|
|
"after": 2500,
|
|
"source": "covering",
|
|
"node": "Index Only Scan using bench_variant on messages",
|
|
"shared_hit": 5,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.019,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 5k",
|
|
"chat_size": 5000,
|
|
"page": "last",
|
|
"after": 4900,
|
|
"source": "app",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 53,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.061,
|
|
"kind": "generic"
|
|
},
|
|
{
|
|
"chat": "bg 400",
|
|
"chat_size": 400,
|
|
"page": "first",
|
|
"after": 0,
|
|
"source": "app",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 53,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.077,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 400",
|
|
"chat_size": 400,
|
|
"page": "middle",
|
|
"after": 200,
|
|
"source": "app",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 54,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.07,
|
|
"kind": "generic"
|
|
},
|
|
{
|
|
"chat": "bg 400",
|
|
"chat_size": 400,
|
|
"page": "middle",
|
|
"after": 200,
|
|
"source": "psql",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 54,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.027,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 400",
|
|
"chat_size": 400,
|
|
"page": "middle",
|
|
"after": 200,
|
|
"source": "generic",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 54,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.027,
|
|
"kind": "generic"
|
|
},
|
|
{
|
|
"chat": "bg 400",
|
|
"chat_size": 400,
|
|
"page": "middle",
|
|
"after": 200,
|
|
"source": "or-cursor",
|
|
"node": "Bitmap Heap Scan on messages",
|
|
"shared_hit": 201,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.124,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 400",
|
|
"chat_size": 400,
|
|
"page": "middle",
|
|
"after": 200,
|
|
"source": "no-index",
|
|
"node": "Parallel Seq Scan on messages",
|
|
"shared_hit": 3882,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 4.377,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 400",
|
|
"chat_size": 400,
|
|
"page": "middle",
|
|
"after": 200,
|
|
"source": "chat_only",
|
|
"node": "Index Scan using bench_variant on messages",
|
|
"shared_hit": 390,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.132,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 400",
|
|
"chat_size": 400,
|
|
"page": "middle",
|
|
"after": 200,
|
|
"source": "covering",
|
|
"node": "Index Only Scan using bench_variant on messages",
|
|
"shared_hit": 5,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.035,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 400",
|
|
"chat_size": 400,
|
|
"page": "last",
|
|
"after": 300,
|
|
"source": "app",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 53,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.068,
|
|
"kind": "generic"
|
|
},
|
|
{
|
|
"chat": "bg 10",
|
|
"chat_size": 10,
|
|
"page": "first",
|
|
"after": 0,
|
|
"source": "app",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 13,
|
|
"shared_read": 0,
|
|
"rows": 10.0,
|
|
"time_ms": 0.022,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 10",
|
|
"chat_size": 10,
|
|
"page": "first",
|
|
"after": 0,
|
|
"source": "psql",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 13,
|
|
"shared_read": 0,
|
|
"rows": 10.0,
|
|
"time_ms": 0.013,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 10",
|
|
"chat_size": 10,
|
|
"page": "first",
|
|
"after": 0,
|
|
"source": "generic",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 13,
|
|
"shared_read": 0,
|
|
"rows": 10.0,
|
|
"time_ms": 0.016,
|
|
"kind": "generic"
|
|
},
|
|
{
|
|
"chat": "bg 10",
|
|
"chat_size": 10,
|
|
"page": "first",
|
|
"after": 0,
|
|
"source": "no-index",
|
|
"node": "Parallel Seq Scan on messages",
|
|
"shared_hit": 3852,
|
|
"shared_read": 0,
|
|
"rows": 10.0,
|
|
"time_ms": 4.21,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 10",
|
|
"chat_size": 10,
|
|
"page": "first",
|
|
"after": 0,
|
|
"source": "chat_only",
|
|
"node": "Index Scan using bench_variant on messages",
|
|
"shared_hit": 13,
|
|
"shared_read": 0,
|
|
"rows": 10.0,
|
|
"time_ms": 0.013,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 10",
|
|
"chat_size": 10,
|
|
"page": "first",
|
|
"after": 0,
|
|
"source": "covering",
|
|
"node": "Index Only Scan using bench_variant on messages",
|
|
"shared_hit": 4,
|
|
"shared_read": 0,
|
|
"rows": 10.0,
|
|
"time_ms": 0.009,
|
|
"kind": "custom"
|
|
}
|
|
],
|
|
"rss_peak_mib": 151.1,
|
|
"write_cost": [
|
|
{
|
|
"variant": "app",
|
|
"columns": "(chat_id, created_at, id)",
|
|
"rows": 20000,
|
|
"messages": 200000,
|
|
"index_bytes": 11796480,
|
|
"index_bytes_per_message": 59.0,
|
|
"insert_us_per_message": [
|
|
5.8,
|
|
5.87,
|
|
5.77
|
|
],
|
|
"wal_bytes_per_message": [
|
|
810.3,
|
|
791.0,
|
|
790.6
|
|
],
|
|
"fpi_per_1000": [
|
|
64.3,
|
|
70.7,
|
|
70.8
|
|
],
|
|
"long_text": "ok"
|
|
},
|
|
{
|
|
"variant": "chat_only",
|
|
"columns": "(chat_id)",
|
|
"rows": 20000,
|
|
"messages": 200000,
|
|
"index_bytes": 1482752,
|
|
"index_bytes_per_message": 7.4,
|
|
"insert_us_per_message": [
|
|
5.3,
|
|
5.22,
|
|
5.3
|
|
],
|
|
"wal_bytes_per_message": [
|
|
645.9,
|
|
645.2,
|
|
643.9
|
|
],
|
|
"fpi_per_1000": [
|
|
60.4,
|
|
61.0,
|
|
61.4
|
|
],
|
|
"long_text": "ok"
|
|
},
|
|
{
|
|
"variant": "covering",
|
|
"columns": "(chat_id, created_at, id) INCLUDE (sender_id, text)",
|
|
"rows": 20000,
|
|
"messages": 200000,
|
|
"index_bytes": 31735808,
|
|
"index_bytes_per_message": 158.7,
|
|
"insert_us_per_message": [
|
|
5.95,
|
|
6.23,
|
|
5.96
|
|
],
|
|
"wal_bytes_per_message": [
|
|
1005.2,
|
|
1004.7,
|
|
1004.6
|
|
],
|
|
"fpi_per_1000": [
|
|
75.3,
|
|
75.7,
|
|
76.0
|
|
],
|
|
"long_text": "index row requires 12072 bytes, maximum size is 8191"
|
|
},
|
|
{
|
|
"variant": "none",
|
|
"columns": null,
|
|
"rows": 20000,
|
|
"messages": 200000,
|
|
"index_bytes": 0,
|
|
"index_bytes_per_message": 0.0,
|
|
"insert_us_per_message": [
|
|
4.93,
|
|
4.79,
|
|
4.72
|
|
],
|
|
"wal_bytes_per_message": [
|
|
545.2,
|
|
545.9,
|
|
545.2
|
|
],
|
|
"fpi_per_1000": [
|
|
57.8,
|
|
58.1,
|
|
58.3
|
|
],
|
|
"long_text": "ok"
|
|
}
|
|
],
|
|
"restore": {
|
|
"messages_before_backup": 200000,
|
|
"messages_at_dump_end": 200655,
|
|
"messages_source_end": 205001,
|
|
"messages_restored": 200144,
|
|
"messages_lost": 4857,
|
|
"lost_after_backup_chat": 1,
|
|
"load_written": 5000,
|
|
"load_failed": 0,
|
|
"load_in_backup": 144,
|
|
"tables_restored": {
|
|
"users": 11,
|
|
"chats": 1112,
|
|
"chat_members": 12232,
|
|
"sessions": 11,
|
|
"messages": 200144
|
|
},
|
|
"backup_bytes": 7914482,
|
|
"backup_bytes_per_message": 39.5,
|
|
"dump_seconds": 0.5,
|
|
"storage_seconds": 0.89,
|
|
"copy_seconds": 0.07,
|
|
"restore_seconds": 0.5,
|
|
"analyze_seconds": 0.15,
|
|
"verify_seconds": 0.72,
|
|
"api_ready_seconds": 2.27,
|
|
"rto_seconds": 3.88,
|
|
"pages_checked": 10,
|
|
"stale_chat_get": 200,
|
|
"stale_chat_post": 500,
|
|
"flushed_chat_get": 404,
|
|
"late_session": 401
|
|
}
|
|
},
|
|
{
|
|
"size": 500000,
|
|
"messages_total": 600000,
|
|
"rss_before_mib": 87.7,
|
|
"rss_after_mib": 93.5,
|
|
"bytes_per_message": 10,
|
|
"prefill_seconds": 613.1,
|
|
"prefill_rate": 979,
|
|
"cursors": 1000,
|
|
"maintenance_seconds": 0.2,
|
|
"messages_rows": 600000,
|
|
"messages_table_bytes": 94748672,
|
|
"messages_indexes_bytes": 87425024,
|
|
"db_bytes_per_message": 304,
|
|
"plans": [
|
|
{
|
|
"chat": "read 500k",
|
|
"chat_size": 500000,
|
|
"page": "first",
|
|
"after": 0,
|
|
"source": "app",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 6,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.035,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "read 500k",
|
|
"chat_size": 500000,
|
|
"page": "middle",
|
|
"after": 250000,
|
|
"source": "app",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 54,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.05,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "read 500k",
|
|
"chat_size": 500000,
|
|
"page": "middle",
|
|
"after": 250000,
|
|
"source": "psql",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 54,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.023,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "read 500k",
|
|
"chat_size": 500000,
|
|
"page": "middle",
|
|
"after": 250000,
|
|
"source": "generic",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 54,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.027,
|
|
"kind": "generic"
|
|
},
|
|
{
|
|
"chat": "read 500k",
|
|
"chat_size": 500000,
|
|
"page": "middle",
|
|
"after": 250000,
|
|
"source": "or-cursor",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 252418,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 36.126,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "read 500k",
|
|
"chat_size": 500000,
|
|
"page": "middle",
|
|
"after": 250000,
|
|
"source": "no-index",
|
|
"node": "Parallel Seq Scan on messages",
|
|
"shared_hit": 11589,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 16.862,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "read 500k",
|
|
"chat_size": 500000,
|
|
"page": "middle",
|
|
"after": 250000,
|
|
"source": "chat_only",
|
|
"node": "Parallel Seq Scan on messages",
|
|
"shared_hit": 11589,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 16.23,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "read 500k",
|
|
"chat_size": 500000,
|
|
"page": "middle",
|
|
"after": 250000,
|
|
"source": "covering",
|
|
"node": "Index Only Scan using bench_variant on messages",
|
|
"shared_hit": 5,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.021,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "read 500k",
|
|
"chat_size": 500000,
|
|
"page": "last",
|
|
"after": 499500,
|
|
"source": "app",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 54,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.045,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 5k",
|
|
"chat_size": 5000,
|
|
"page": "first",
|
|
"after": 0,
|
|
"source": "app",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 51,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.071,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 5k",
|
|
"chat_size": 5000,
|
|
"page": "middle",
|
|
"after": 2500,
|
|
"source": "app",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 51,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.058,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 5k",
|
|
"chat_size": 5000,
|
|
"page": "middle",
|
|
"after": 2500,
|
|
"source": "psql",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 51,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.027,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 5k",
|
|
"chat_size": 5000,
|
|
"page": "middle",
|
|
"after": 2500,
|
|
"source": "generic",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 51,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.03,
|
|
"kind": "generic"
|
|
},
|
|
{
|
|
"chat": "bg 5k",
|
|
"chat_size": 5000,
|
|
"page": "middle",
|
|
"after": 2500,
|
|
"source": "or-cursor",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 2448,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.506,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 5k",
|
|
"chat_size": 5000,
|
|
"page": "middle",
|
|
"after": 2500,
|
|
"source": "no-index",
|
|
"node": "Parallel Seq Scan on messages",
|
|
"shared_hit": 11589,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 10.282,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 5k",
|
|
"chat_size": 5000,
|
|
"page": "middle",
|
|
"after": 2500,
|
|
"source": "chat_only",
|
|
"node": "Index Scan using bench_variant on messages",
|
|
"shared_hit": 4168,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 1.345,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 5k",
|
|
"chat_size": 5000,
|
|
"page": "middle",
|
|
"after": 2500,
|
|
"source": "covering",
|
|
"node": "Index Only Scan using bench_variant on messages",
|
|
"shared_hit": 5,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.021,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 5k",
|
|
"chat_size": 5000,
|
|
"page": "last",
|
|
"after": 4900,
|
|
"source": "app",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 52,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.065,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 400",
|
|
"chat_size": 400,
|
|
"page": "first",
|
|
"after": 0,
|
|
"source": "app",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 54,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.066,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 400",
|
|
"chat_size": 400,
|
|
"page": "middle",
|
|
"after": 200,
|
|
"source": "app",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 55,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.067,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 400",
|
|
"chat_size": 400,
|
|
"page": "middle",
|
|
"after": 200,
|
|
"source": "psql",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 55,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.032,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 400",
|
|
"chat_size": 400,
|
|
"page": "middle",
|
|
"after": 200,
|
|
"source": "generic",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 55,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.03,
|
|
"kind": "generic"
|
|
},
|
|
{
|
|
"chat": "bg 400",
|
|
"chat_size": 400,
|
|
"page": "middle",
|
|
"after": 200,
|
|
"source": "or-cursor",
|
|
"node": "Bitmap Heap Scan on messages",
|
|
"shared_hit": 208,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.118,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 400",
|
|
"chat_size": 400,
|
|
"page": "middle",
|
|
"after": 200,
|
|
"source": "no-index",
|
|
"node": "Parallel Seq Scan on messages",
|
|
"shared_hit": 11589,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 9.445,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 400",
|
|
"chat_size": 400,
|
|
"page": "middle",
|
|
"after": 200,
|
|
"source": "chat_only",
|
|
"node": "Index Scan using bench_variant on messages",
|
|
"shared_hit": 403,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.134,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 400",
|
|
"chat_size": 400,
|
|
"page": "middle",
|
|
"after": 200,
|
|
"source": "covering",
|
|
"node": "Index Only Scan using bench_variant on messages",
|
|
"shared_hit": 5,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.018,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 400",
|
|
"chat_size": 400,
|
|
"page": "last",
|
|
"after": 300,
|
|
"source": "app",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 55,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.079,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 10",
|
|
"chat_size": 10,
|
|
"page": "first",
|
|
"after": 0,
|
|
"source": "app",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 13,
|
|
"shared_read": 0,
|
|
"rows": 10.0,
|
|
"time_ms": 0.023,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 10",
|
|
"chat_size": 10,
|
|
"page": "first",
|
|
"after": 0,
|
|
"source": "psql",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 13,
|
|
"shared_read": 0,
|
|
"rows": 10.0,
|
|
"time_ms": 0.012,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 10",
|
|
"chat_size": 10,
|
|
"page": "first",
|
|
"after": 0,
|
|
"source": "generic",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 13,
|
|
"shared_read": 0,
|
|
"rows": 10.0,
|
|
"time_ms": 0.015,
|
|
"kind": "generic"
|
|
},
|
|
{
|
|
"chat": "bg 10",
|
|
"chat_size": 10,
|
|
"page": "first",
|
|
"after": 0,
|
|
"source": "no-index",
|
|
"node": "Parallel Seq Scan on messages",
|
|
"shared_hit": 11649,
|
|
"shared_read": 0,
|
|
"rows": 10.0,
|
|
"time_ms": 9.766,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 10",
|
|
"chat_size": 10,
|
|
"page": "first",
|
|
"after": 0,
|
|
"source": "chat_only",
|
|
"node": "Index Scan using bench_variant on messages",
|
|
"shared_hit": 13,
|
|
"shared_read": 0,
|
|
"rows": 10.0,
|
|
"time_ms": 0.013,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 10",
|
|
"chat_size": 10,
|
|
"page": "first",
|
|
"after": 0,
|
|
"source": "covering",
|
|
"node": "Index Only Scan using bench_variant on messages",
|
|
"shared_hit": 4,
|
|
"shared_read": 0,
|
|
"rows": 10.0,
|
|
"time_ms": 0.008,
|
|
"kind": "custom"
|
|
}
|
|
],
|
|
"rss_peak_mib": 151.1,
|
|
"write_cost": [
|
|
{
|
|
"variant": "app",
|
|
"columns": "(chat_id, created_at, id)",
|
|
"rows": 20000,
|
|
"messages": 600000,
|
|
"index_bytes": 35348480,
|
|
"index_bytes_per_message": 58.9,
|
|
"insert_us_per_message": [
|
|
6.73,
|
|
6.35,
|
|
6.25
|
|
],
|
|
"wal_bytes_per_message": [
|
|
1326.9,
|
|
1306.0,
|
|
1304.7
|
|
],
|
|
"fpi_per_1000": [
|
|
158.2,
|
|
166.4,
|
|
166.4
|
|
],
|
|
"long_text": "ok"
|
|
},
|
|
{
|
|
"variant": "chat_only",
|
|
"columns": "(chat_id)",
|
|
"rows": 20000,
|
|
"messages": 600000,
|
|
"index_bytes": 4300800,
|
|
"index_bytes_per_message": 7.2,
|
|
"insert_us_per_message": [
|
|
6.01,
|
|
5.8,
|
|
6.1
|
|
],
|
|
"wal_bytes_per_message": [
|
|
1225.3,
|
|
1219.2,
|
|
1217.8
|
|
],
|
|
"fpi_per_1000": [
|
|
160.9,
|
|
162.9,
|
|
164.2
|
|
],
|
|
"long_text": "ok"
|
|
},
|
|
{
|
|
"variant": "covering",
|
|
"columns": "(chat_id, created_at, id) INCLUDE (sender_id, text)",
|
|
"rows": 20000,
|
|
"messages": 600000,
|
|
"index_bytes": 95141888,
|
|
"index_bytes_per_message": 158.6,
|
|
"insert_us_per_message": [
|
|
6.86,
|
|
6.45,
|
|
6.46
|
|
],
|
|
"wal_bytes_per_message": [
|
|
1539.0,
|
|
1535.7,
|
|
1533.8
|
|
],
|
|
"fpi_per_1000": [
|
|
170.0,
|
|
171.1,
|
|
171.6
|
|
],
|
|
"long_text": "index row requires 12072 bytes, maximum size is 8191"
|
|
},
|
|
{
|
|
"variant": "none",
|
|
"columns": null,
|
|
"rows": 20000,
|
|
"messages": 600000,
|
|
"index_bytes": 0,
|
|
"index_bytes_per_message": 0.0,
|
|
"insert_us_per_message": [
|
|
5.06,
|
|
5.32,
|
|
5.08
|
|
],
|
|
"wal_bytes_per_message": [
|
|
1118.4,
|
|
1117.4,
|
|
1115.9
|
|
],
|
|
"fpi_per_1000": [
|
|
158.9,
|
|
159.8,
|
|
160.0
|
|
],
|
|
"long_text": "ok"
|
|
}
|
|
],
|
|
"restore": {
|
|
"messages_before_backup": 600000,
|
|
"messages_at_dump_end": 601397,
|
|
"messages_source_end": 605001,
|
|
"messages_restored": 600158,
|
|
"messages_lost": 4843,
|
|
"lost_after_backup_chat": 1,
|
|
"load_written": 5000,
|
|
"load_failed": 0,
|
|
"load_in_backup": 158,
|
|
"tables_restored": {
|
|
"users": 11,
|
|
"chats": 1112,
|
|
"chat_members": 12232,
|
|
"sessions": 11,
|
|
"messages": 600158
|
|
},
|
|
"backup_bytes": 21981827,
|
|
"backup_bytes_per_message": 36.6,
|
|
"dump_seconds": 1.3,
|
|
"storage_seconds": 0.89,
|
|
"copy_seconds": 0.15,
|
|
"restore_seconds": 1.43,
|
|
"analyze_seconds": 0.17,
|
|
"verify_seconds": 1.74,
|
|
"api_ready_seconds": 2.12,
|
|
"rto_seconds": 4.76,
|
|
"pages_checked": 10,
|
|
"stale_chat_get": 200,
|
|
"stale_chat_post": 500,
|
|
"flushed_chat_get": 404,
|
|
"late_session": 401
|
|
}
|
|
}
|
|
],
|
|
"limits": {
|
|
"api": {
|
|
"nano_cpus": 1000000000,
|
|
"memory": 2147483648,
|
|
"memory_swap": 2147483648,
|
|
"published_ports": {},
|
|
"healthcheck": [
|
|
"NONE"
|
|
],
|
|
"log_driver": "local"
|
|
},
|
|
"postgres": {
|
|
"nano_cpus": 4000000000,
|
|
"memory": 3221225472,
|
|
"memory_swap": 3221225472,
|
|
"published_ports": {},
|
|
"healthcheck": [
|
|
"CMD-SHELL",
|
|
"pg_isready -h 127.0.0.1 -U \"$POSTGRES_USER\" -d \"$POSTGRES_DB\""
|
|
],
|
|
"log_driver": "local"
|
|
},
|
|
"valkey": {
|
|
"nano_cpus": 2000000000,
|
|
"memory": 536870912,
|
|
"memory_swap": 536870912,
|
|
"published_ports": {},
|
|
"healthcheck": [
|
|
"CMD-SHELL",
|
|
"test \"$(valkey-cli -p \"$VALKEY_PORT\" ping)\" = PONG"
|
|
],
|
|
"log_driver": "local"
|
|
}
|
|
},
|
|
"stand": {
|
|
"postgres": {
|
|
"image": "postgres:18.6-trixie@sha256:5a5a84b19854a9ffaa54082c166ff4ec27473a361e496e5ea167f298f2da9722",
|
|
"id": "sha256:5a5a84b19854a9ffaa54082c166ff4ec27473a361e496e5ea167f298f2da9722",
|
|
"version": "18.6 (Debian 18.6-1.pgdg13+2)",
|
|
"settings": {
|
|
"autovacuum": "on",
|
|
"checkpoint_timeout": "5min",
|
|
"effective_cache_size": "4GB",
|
|
"fsync": "on",
|
|
"jit": "on",
|
|
"maintenance_work_mem": "64MB",
|
|
"max_connections": "100",
|
|
"max_wal_size": "1GB",
|
|
"plan_cache_mode": "auto",
|
|
"random_page_cost": "4",
|
|
"shared_buffers": "128MB",
|
|
"shared_preload_libraries": "auto_explain",
|
|
"synchronous_commit": "on",
|
|
"wal_level": "replica",
|
|
"work_mem": "4MB"
|
|
}
|
|
},
|
|
"valkey": {
|
|
"image": "valkey/valkey:9.1.2-trixie@sha256:418652cfb58ef879d4978c33553735d7147016032d5aefaa14c828e611eb9dfd",
|
|
"id": "sha256:418652cfb58ef879d4978c33553735d7147016032d5aefaa14c828e611eb9dfd",
|
|
"version": "9.1.2",
|
|
"maxmemory": "67108864",
|
|
"maxmemory-clients": "0",
|
|
"maxmemory-eviction-tenacity": "10",
|
|
"maxmemory-policy": "allkeys-lru",
|
|
"maxmemory-samples": "5"
|
|
},
|
|
"app_env": {
|
|
"APP__PORT": "8080",
|
|
"APP__RUN_MODE": "docker",
|
|
"AUTH__SESSION_TTL_SECONDS": "21600",
|
|
"CACHE__HOST": "valkey",
|
|
"CACHE__PORT": "6379",
|
|
"DATABASE__HOST": "postgres",
|
|
"DATABASE__NAME": "bench",
|
|
"DATABASE__PORT": "5432",
|
|
"DATABASE__USER": "bench"
|
|
}
|
|
},
|
|
"finished_at": "2026-10-02T04:43:03+00:00"
|
|
}
|