1889 lines
49 KiB
JSON
1889 lines
49 KiB
JSON
{
|
|
"label": "unit-of-work-after",
|
|
"status": "complete",
|
|
"started_at": "2026-10-31T20:23:07+00:00",
|
|
"command": "uv run python bench/run.py --profile quick --label unit-of-work-after",
|
|
"git": {
|
|
"commit": "6ba74b1",
|
|
"dirty": false
|
|
},
|
|
"overrides": {},
|
|
"host_state": {
|
|
"start": {
|
|
"swap_used_mib": 7631.62,
|
|
"swap_total_mib": 8192.0,
|
|
"swapouts": 7156652,
|
|
"memory_free_percent": 49,
|
|
"power": "AC Power",
|
|
"battery_percent": 80
|
|
},
|
|
"end": {
|
|
"swap_used_mib": 7599.62,
|
|
"swap_total_mib": 8192.0,
|
|
"swapouts": 7156652,
|
|
"memory_free_percent": 44,
|
|
"power": "AC Power",
|
|
"battery_percent": 80
|
|
},
|
|
"swapouts_delta": 0,
|
|
"slept_seconds": 0
|
|
},
|
|
"host_warnings": [],
|
|
"other_containers": [
|
|
"domains-api-1",
|
|
"domains-bot-1",
|
|
"domains-postgres-1"
|
|
],
|
|
"app_image": {
|
|
"tag": "mtusi-messenger:bench",
|
|
"id": "sha256:e3a79e5643dc4ad8a5db9fcdc394e278b5bad66735a21065b7b09e64456d5210",
|
|
"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.9.2",
|
|
"vm_os": "Docker Desktop",
|
|
"kernel": "7.0.14-linuxkit",
|
|
"vm_cpus": 12,
|
|
"vm_memory_gib": 7.7,
|
|
"cgroup": "2",
|
|
"logging_driver": "local"
|
|
},
|
|
"host": {
|
|
"os": "macOS 26.7.1",
|
|
"machine": "Apple M3 Pro",
|
|
"memory_gib": 18.0,
|
|
"performance_cores": 6,
|
|
"efficiency_cores": 6
|
|
},
|
|
"profile": {
|
|
"name": "quick",
|
|
"sizes": [
|
|
1000,
|
|
5000,
|
|
10000
|
|
],
|
|
"concurrency": [
|
|
1,
|
|
4,
|
|
16
|
|
],
|
|
"repeats": 1,
|
|
"read_warmup_s": 2,
|
|
"read_measure_s": 5,
|
|
"write_warmup": 100,
|
|
"write_measure": 1000,
|
|
"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": [
|
|
[
|
|
2,
|
|
1000
|
|
],
|
|
[
|
|
10,
|
|
100
|
|
],
|
|
[
|
|
50,
|
|
10
|
|
]
|
|
],
|
|
"index_variants": [
|
|
[
|
|
"chat_only",
|
|
"(chat_id)"
|
|
],
|
|
[
|
|
"covering",
|
|
"(chat_id, created_at, id) INCLUDE (sender_id, text)"
|
|
]
|
|
],
|
|
"write_probe_rows": 5000,
|
|
"write_probe_repeats": 3,
|
|
"restore": false,
|
|
"restore_jobs": 4,
|
|
"restore_write_load": 5000,
|
|
"restore_write_vus": 10,
|
|
"replicas": 1,
|
|
"lb_cpus": "1",
|
|
"lb_memory": "256m",
|
|
"failover_modes": [],
|
|
"failover_write_rate": 0,
|
|
"failover_read_rate": 0,
|
|
"failover_before_s": 0,
|
|
"failover_down_s": 0,
|
|
"failover_after_s": 0,
|
|
"failover_success": 0.99,
|
|
"failover_pre_vus": 600,
|
|
"failover_max_vus": 1500,
|
|
"rollout_from": "",
|
|
"rollout_before_s": 0,
|
|
"rollout_budget_s": 0,
|
|
"rollout_after_s": 0,
|
|
"sample_resources": false,
|
|
"uploads_variants": [],
|
|
"uploads_before": "",
|
|
"uploads_success_codes": [
|
|
[
|
|
"before",
|
|
201
|
|
],
|
|
[
|
|
"unlimited",
|
|
202
|
|
],
|
|
[
|
|
"limited",
|
|
202
|
|
]
|
|
],
|
|
"uploads_sizes": [],
|
|
"uploads_clients": [],
|
|
"uploads_ramp_s": 3,
|
|
"uploads_window_s": 20,
|
|
"uploads_unlimited_env": [
|
|
[
|
|
"UPLOADS__MAX_CONCURRENT",
|
|
"1000"
|
|
],
|
|
[
|
|
"UPLOADS__MAX_WAITING",
|
|
"0"
|
|
]
|
|
],
|
|
"uploads_sample_interval_s": 0.2,
|
|
"s3_cpus": "1",
|
|
"s3_memory": "512m",
|
|
"broker_cpus": "1",
|
|
"broker_memory": "512m",
|
|
"relay_cpus": "0.25",
|
|
"relay_memory": "256m",
|
|
"worker_cpus": "1",
|
|
"worker_memory": "1g",
|
|
"cleaner_cpus": "0.25",
|
|
"cleaner_memory": "256m",
|
|
"reconcile_stages": [],
|
|
"reconcile_before": "",
|
|
"reconcile_s4_clean": 0,
|
|
"reconcile_s4_candidates": [],
|
|
"reconcile_s4_max_changes": 100,
|
|
"reconcile_grace_s": 30,
|
|
"reconcile_fresh_wait_s": 2,
|
|
"reconcile_fast_cpus": "1",
|
|
"reconcile_default_rate": 2000,
|
|
"reconcile_background": [
|
|
[
|
|
"download",
|
|
300
|
|
],
|
|
[
|
|
"write",
|
|
50
|
|
],
|
|
[
|
|
"read",
|
|
50
|
|
]
|
|
],
|
|
"reconcile_downloads": 5000,
|
|
"reconcile_bg_max_vus": 600,
|
|
"reconcile_quiet_s": 30,
|
|
"reconcile_fill_processes": 3,
|
|
"reconcile_fill_threads": 24,
|
|
"reconcile_sample_interval_s": 0.5,
|
|
"reconcile_metrics_port": 9327,
|
|
"reconcile_h1_stages": [],
|
|
"reconcile_h2_stages": [],
|
|
"reconcile_h3_stages": [],
|
|
"reconcile_s4_base": "",
|
|
"db_max_connections": 100,
|
|
"series": "",
|
|
"configs": [],
|
|
"write_chats": 1,
|
|
"mix": [],
|
|
"fixed_rps": [],
|
|
"ladder_base": 100,
|
|
"step_factor": 1.25,
|
|
"start_rps_per_replica": 300,
|
|
"bisect_steps": 2,
|
|
"max_steps": 12,
|
|
"first_warmup_s": 15,
|
|
"step_warmup_s": 5,
|
|
"step_measure_s": 20,
|
|
"cooldown_s": 10,
|
|
"slo_p95_ms": 200,
|
|
"slo_error_ratio": 0.01,
|
|
"abort_error_ratio": 0.5,
|
|
"abort_p95_ms": 2000,
|
|
"request_timeout_s": 15,
|
|
"prevus_per_rps": 0.05,
|
|
"vus_per_rps": 0.2,
|
|
"generator_cpus": "",
|
|
"generator_memory": "",
|
|
"sampler_cpus": "0.25",
|
|
"sampler_memory": "128m",
|
|
"sample_interval_s": 1.0,
|
|
"order_seed": 20261011
|
|
},
|
|
"sizes": [
|
|
{
|
|
"size": 1000,
|
|
"messages_total": 4500,
|
|
"rss_before_mib": 121.4,
|
|
"rss_after_mib": 127.6,
|
|
"bytes_per_message": 1430,
|
|
"prefill_seconds": 9.2,
|
|
"prefill_rate": 488,
|
|
"cursors": 9,
|
|
"maintenance_seconds": 0.1,
|
|
"messages_rows": 4500,
|
|
"messages_table_bytes": 868352,
|
|
"messages_indexes_bytes": 614400,
|
|
"db_bytes_per_message": 330,
|
|
"plans": [
|
|
{
|
|
"chat": "read 1k",
|
|
"chat_size": 1000,
|
|
"page": "first",
|
|
"after": 0,
|
|
"source": "app",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 27,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.156,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "read 1k",
|
|
"chat_size": 1000,
|
|
"page": "middle",
|
|
"after": 500,
|
|
"source": "app",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 47,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.16,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "read 1k",
|
|
"chat_size": 1000,
|
|
"page": "middle",
|
|
"after": 500,
|
|
"source": "psql",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 47,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.07,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "read 1k",
|
|
"chat_size": 1000,
|
|
"page": "middle",
|
|
"after": 500,
|
|
"source": "generic",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 47,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.069,
|
|
"kind": "generic"
|
|
},
|
|
{
|
|
"chat": "read 1k",
|
|
"chat_size": 1000,
|
|
"page": "middle",
|
|
"after": 500,
|
|
"source": "or-cursor",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 496,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.128,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "read 1k",
|
|
"chat_size": 1000,
|
|
"page": "middle",
|
|
"after": 500,
|
|
"source": "no-index",
|
|
"node": "Seq Scan on messages",
|
|
"shared_hit": 101,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.578,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "read 1k",
|
|
"chat_size": 1000,
|
|
"page": "middle",
|
|
"after": 500,
|
|
"source": "chat_only",
|
|
"node": "Bitmap Heap Scan on messages",
|
|
"shared_hit": 103,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.466,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "read 1k",
|
|
"chat_size": 1000,
|
|
"page": "middle",
|
|
"after": 500,
|
|
"source": "covering",
|
|
"node": "Index Only Scan using bench_variant on messages",
|
|
"shared_hit": 4,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.057,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "read 1k",
|
|
"chat_size": 1000,
|
|
"page": "last",
|
|
"after": 900,
|
|
"source": "app",
|
|
"node": "Bitmap Heap Scan on messages",
|
|
"shared_hit": 22,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.279,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 1k",
|
|
"chat_size": 1000,
|
|
"page": "first",
|
|
"after": 0,
|
|
"source": "app",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 32,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.135,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 1k",
|
|
"chat_size": 1000,
|
|
"page": "middle",
|
|
"after": 500,
|
|
"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.108,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 1k",
|
|
"chat_size": 1000,
|
|
"page": "middle",
|
|
"after": 500,
|
|
"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.068,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 1k",
|
|
"chat_size": 1000,
|
|
"page": "middle",
|
|
"after": 500,
|
|
"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.069,
|
|
"kind": "generic"
|
|
},
|
|
{
|
|
"chat": "bg 1k",
|
|
"chat_size": 1000,
|
|
"page": "middle",
|
|
"after": 500,
|
|
"source": "or-cursor",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 487,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.125,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 1k",
|
|
"chat_size": 1000,
|
|
"page": "middle",
|
|
"after": 500,
|
|
"source": "no-index",
|
|
"node": "Seq Scan on messages",
|
|
"shared_hit": 101,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.489,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 1k",
|
|
"chat_size": 1000,
|
|
"page": "middle",
|
|
"after": 500,
|
|
"source": "chat_only",
|
|
"node": "Bitmap Heap Scan on messages",
|
|
"shared_hit": 101,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.431,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 1k",
|
|
"chat_size": 1000,
|
|
"page": "middle",
|
|
"after": 500,
|
|
"source": "covering",
|
|
"node": "Index Only Scan using bench_variant on messages",
|
|
"shared_hit": 4,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.055,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 1k",
|
|
"chat_size": 1000,
|
|
"page": "last",
|
|
"after": 900,
|
|
"source": "app",
|
|
"node": "Bitmap Heap Scan on messages",
|
|
"shared_hit": 19,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.154,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 100",
|
|
"chat_size": 100,
|
|
"page": "first",
|
|
"after": 0,
|
|
"source": "app",
|
|
"node": "Bitmap Heap Scan on messages",
|
|
"shared_hit": 65,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.314,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 100",
|
|
"chat_size": 100,
|
|
"page": "first",
|
|
"after": 0,
|
|
"source": "psql",
|
|
"node": "Bitmap Heap Scan on messages",
|
|
"shared_hit": 65,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.138,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 100",
|
|
"chat_size": 100,
|
|
"page": "first",
|
|
"after": 0,
|
|
"source": "generic",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 45,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.065,
|
|
"kind": "generic"
|
|
},
|
|
{
|
|
"chat": "bg 100",
|
|
"chat_size": 100,
|
|
"page": "first",
|
|
"after": 0,
|
|
"source": "no-index",
|
|
"node": "Seq Scan on messages",
|
|
"shared_hit": 101,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.198,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 100",
|
|
"chat_size": 100,
|
|
"page": "first",
|
|
"after": 0,
|
|
"source": "chat_only",
|
|
"node": "Bitmap Heap Scan on messages",
|
|
"shared_hit": 65,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.125,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 100",
|
|
"chat_size": 100,
|
|
"page": "first",
|
|
"after": 0,
|
|
"source": "covering",
|
|
"node": "Index Only Scan using bench_variant on messages",
|
|
"shared_hit": 4,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.049,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 10",
|
|
"chat_size": 10,
|
|
"page": "first",
|
|
"after": 0,
|
|
"source": "app",
|
|
"node": "Bitmap Heap Scan on messages",
|
|
"shared_hit": 12,
|
|
"shared_read": 0,
|
|
"rows": 10.0,
|
|
"time_ms": 0.043,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 10",
|
|
"chat_size": 10,
|
|
"page": "first",
|
|
"after": 0,
|
|
"source": "psql",
|
|
"node": "Bitmap Heap Scan on messages",
|
|
"shared_hit": 12,
|
|
"shared_read": 0,
|
|
"rows": 10.0,
|
|
"time_ms": 0.047,
|
|
"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": 12,
|
|
"shared_read": 0,
|
|
"rows": 10.0,
|
|
"time_ms": 0.029,
|
|
"kind": "generic"
|
|
},
|
|
{
|
|
"chat": "bg 10",
|
|
"chat_size": 10,
|
|
"page": "first",
|
|
"after": 0,
|
|
"source": "no-index",
|
|
"node": "Seq Scan on messages",
|
|
"shared_hit": 101,
|
|
"shared_read": 0,
|
|
"rows": 10.0,
|
|
"time_ms": 0.146,
|
|
"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.033,
|
|
"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": 3,
|
|
"shared_read": 0,
|
|
"rows": 10.0,
|
|
"time_ms": 0.015,
|
|
"kind": "custom"
|
|
}
|
|
],
|
|
"rss_peak_mib": 185.0,
|
|
"write_cost": [
|
|
{
|
|
"variant": "app",
|
|
"columns": "(chat_id, created_at, id)",
|
|
"rows": 5000,
|
|
"messages": 7800,
|
|
"index_bytes": 475136,
|
|
"index_bytes_per_message": 60.9,
|
|
"insert_us_per_message": [
|
|
5.86,
|
|
5.07,
|
|
5.8
|
|
],
|
|
"wal_bytes_per_message": [
|
|
501.0,
|
|
489.6,
|
|
489.6
|
|
],
|
|
"fpi_per_1000": [
|
|
12.0,
|
|
21.2,
|
|
21.2
|
|
],
|
|
"long_text": "ok"
|
|
},
|
|
{
|
|
"variant": "chat_only",
|
|
"columns": "(chat_id)",
|
|
"rows": 5000,
|
|
"messages": 7800,
|
|
"index_bytes": 73728,
|
|
"index_bytes_per_message": 9.5,
|
|
"insert_us_per_message": [
|
|
4.97,
|
|
4.89,
|
|
5.17
|
|
],
|
|
"wal_bytes_per_message": [
|
|
402.8,
|
|
401.7,
|
|
401.7
|
|
],
|
|
"fpi_per_1000": [
|
|
18.6,
|
|
18.6,
|
|
18.6
|
|
],
|
|
"long_text": "ok"
|
|
},
|
|
{
|
|
"variant": "covering",
|
|
"columns": "(chat_id, created_at, id) INCLUDE (sender_id, text)",
|
|
"rows": 5000,
|
|
"messages": 7800,
|
|
"index_bytes": 1245184,
|
|
"index_bytes_per_message": 159.6,
|
|
"insert_us_per_message": [
|
|
5.55,
|
|
5.38,
|
|
6.05
|
|
],
|
|
"wal_bytes_per_message": [
|
|
694.8,
|
|
694.8,
|
|
694.8
|
|
],
|
|
"fpi_per_1000": [
|
|
25.0,
|
|
25.0,
|
|
25.0
|
|
],
|
|
"long_text": "index row requires 12072 bytes, maximum size is 8191"
|
|
},
|
|
{
|
|
"variant": "none",
|
|
"columns": null,
|
|
"rows": 5000,
|
|
"messages": 7800,
|
|
"index_bytes": 0,
|
|
"index_bytes_per_message": 0.0,
|
|
"insert_us_per_message": [
|
|
4.38,
|
|
4.35,
|
|
4.38
|
|
],
|
|
"wal_bytes_per_message": [
|
|
314.5,
|
|
314.5,
|
|
314.5
|
|
],
|
|
"fpi_per_1000": [
|
|
17.2,
|
|
17.2,
|
|
17.2
|
|
],
|
|
"long_text": "ok"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"size": 5000,
|
|
"messages_total": 8500,
|
|
"rss_before_mib": 121.5,
|
|
"rss_after_mib": 127.6,
|
|
"bytes_per_message": 758,
|
|
"prefill_seconds": 17.3,
|
|
"prefill_rate": 492,
|
|
"cursors": 49,
|
|
"maintenance_seconds": 0.1,
|
|
"messages_rows": 8500,
|
|
"messages_table_bytes": 1548288,
|
|
"messages_indexes_bytes": 1179648,
|
|
"db_bytes_per_message": 321,
|
|
"plans": [
|
|
{
|
|
"chat": "read 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": 25,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.156,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "read 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": 53,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.178,
|
|
"kind": "generic"
|
|
},
|
|
{
|
|
"chat": "read 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": 53,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.065,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "read 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": 53,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.077,
|
|
"kind": "generic"
|
|
},
|
|
{
|
|
"chat": "read 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": 2365,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.38,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "read 5k",
|
|
"chat_size": 5000,
|
|
"page": "middle",
|
|
"after": 2500,
|
|
"source": "no-index",
|
|
"node": "Seq Scan on messages",
|
|
"shared_hit": 184,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 2.122,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "read 5k",
|
|
"chat_size": 5000,
|
|
"page": "middle",
|
|
"after": 2500,
|
|
"source": "chat_only",
|
|
"node": "Seq Scan on messages",
|
|
"shared_hit": 184,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 2.124,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "read 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.053,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "read 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": 50,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.159,
|
|
"kind": "generic"
|
|
},
|
|
{
|
|
"chat": "bg 1k",
|
|
"chat_size": 1000,
|
|
"page": "first",
|
|
"after": 0,
|
|
"source": "app",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 42,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.113,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 1k",
|
|
"chat_size": 1000,
|
|
"page": "middle",
|
|
"after": 500,
|
|
"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.128,
|
|
"kind": "generic"
|
|
},
|
|
{
|
|
"chat": "bg 1k",
|
|
"chat_size": 1000,
|
|
"page": "middle",
|
|
"after": 500,
|
|
"source": "psql",
|
|
"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.064,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 1k",
|
|
"chat_size": 1000,
|
|
"page": "middle",
|
|
"after": 500,
|
|
"source": "generic",
|
|
"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.064,
|
|
"kind": "generic"
|
|
},
|
|
{
|
|
"chat": "bg 1k",
|
|
"chat_size": 1000,
|
|
"page": "middle",
|
|
"after": 500,
|
|
"source": "or-cursor",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 498,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.114,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 1k",
|
|
"chat_size": 1000,
|
|
"page": "middle",
|
|
"after": 500,
|
|
"source": "no-index",
|
|
"node": "Seq Scan on messages",
|
|
"shared_hit": 184,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.568,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 1k",
|
|
"chat_size": 1000,
|
|
"page": "middle",
|
|
"after": 500,
|
|
"source": "chat_only",
|
|
"node": "Bitmap Heap Scan on messages",
|
|
"shared_hit": 186,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.435,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 1k",
|
|
"chat_size": 1000,
|
|
"page": "middle",
|
|
"after": 500,
|
|
"source": "covering",
|
|
"node": "Index Only Scan using bench_variant on messages",
|
|
"shared_hit": 5,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.053,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 1k",
|
|
"chat_size": 1000,
|
|
"page": "last",
|
|
"after": 900,
|
|
"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.108,
|
|
"kind": "generic"
|
|
},
|
|
{
|
|
"chat": "bg 100",
|
|
"chat_size": 100,
|
|
"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.172,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 100",
|
|
"chat_size": 100,
|
|
"page": "first",
|
|
"after": 0,
|
|
"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.061,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 100",
|
|
"chat_size": 100,
|
|
"page": "first",
|
|
"after": 0,
|
|
"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.063,
|
|
"kind": "generic"
|
|
},
|
|
{
|
|
"chat": "bg 100",
|
|
"chat_size": 100,
|
|
"page": "first",
|
|
"after": 0,
|
|
"source": "no-index",
|
|
"node": "Seq Scan on messages",
|
|
"shared_hit": 184,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.273,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 100",
|
|
"chat_size": 100,
|
|
"page": "first",
|
|
"after": 0,
|
|
"source": "chat_only",
|
|
"node": "Bitmap Heap Scan on messages",
|
|
"shared_hit": 84,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.129,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 100",
|
|
"chat_size": 100,
|
|
"page": "first",
|
|
"after": 0,
|
|
"source": "covering",
|
|
"node": "Index Only Scan using bench_variant on messages",
|
|
"shared_hit": 5,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.048,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 10",
|
|
"chat_size": 10,
|
|
"page": "first",
|
|
"after": 0,
|
|
"source": "app",
|
|
"node": "Bitmap Heap Scan on messages",
|
|
"shared_hit": 12,
|
|
"shared_read": 0,
|
|
"rows": 10.0,
|
|
"time_ms": 0.052,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 10",
|
|
"chat_size": 10,
|
|
"page": "first",
|
|
"after": 0,
|
|
"source": "psql",
|
|
"node": "Bitmap Heap Scan on messages",
|
|
"shared_hit": 12,
|
|
"shared_read": 0,
|
|
"rows": 10.0,
|
|
"time_ms": 0.03,
|
|
"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": 12,
|
|
"shared_read": 0,
|
|
"rows": 10.0,
|
|
"time_ms": 0.024,
|
|
"kind": "generic"
|
|
},
|
|
{
|
|
"chat": "bg 10",
|
|
"chat_size": 10,
|
|
"page": "first",
|
|
"after": 0,
|
|
"source": "no-index",
|
|
"node": "Seq Scan on messages",
|
|
"shared_hit": 184,
|
|
"shared_read": 0,
|
|
"rows": 10.0,
|
|
"time_ms": 0.202,
|
|
"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.022,
|
|
"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.019,
|
|
"kind": "custom"
|
|
}
|
|
],
|
|
"rss_peak_mib": 185.0,
|
|
"write_cost": [
|
|
{
|
|
"variant": "app",
|
|
"columns": "(chat_id, created_at, id)",
|
|
"rows": 5000,
|
|
"messages": 11800,
|
|
"index_bytes": 712704,
|
|
"index_bytes_per_message": 60.4,
|
|
"insert_us_per_message": [
|
|
5.91,
|
|
4.98,
|
|
6.52
|
|
],
|
|
"wal_bytes_per_message": [
|
|
500.6,
|
|
506.1,
|
|
506.1
|
|
],
|
|
"fpi_per_1000": [
|
|
17.6,
|
|
22.0,
|
|
22.0
|
|
],
|
|
"long_text": "ok"
|
|
},
|
|
{
|
|
"variant": "chat_only",
|
|
"columns": "(chat_id)",
|
|
"rows": 5000,
|
|
"messages": 11800,
|
|
"index_bytes": 106496,
|
|
"index_bytes_per_message": 9.0,
|
|
"insert_us_per_message": [
|
|
5.02,
|
|
5.05,
|
|
4.87
|
|
],
|
|
"wal_bytes_per_message": [
|
|
423.8,
|
|
423.2,
|
|
422.0
|
|
],
|
|
"fpi_per_1000": [
|
|
19.2,
|
|
19.8,
|
|
19.8
|
|
],
|
|
"long_text": "ok"
|
|
},
|
|
{
|
|
"variant": "covering",
|
|
"columns": "(chat_id, created_at, id) INCLUDE (sender_id, text)",
|
|
"rows": 5000,
|
|
"messages": 11800,
|
|
"index_bytes": 1892352,
|
|
"index_bytes_per_message": 160.4,
|
|
"insert_us_per_message": [
|
|
5.77,
|
|
5.55,
|
|
5.61
|
|
],
|
|
"wal_bytes_per_message": [
|
|
712.0,
|
|
710.9,
|
|
710.9
|
|
],
|
|
"fpi_per_1000": [
|
|
25.4,
|
|
25.6,
|
|
25.6
|
|
],
|
|
"long_text": "index row requires 12072 bytes, maximum size is 8191"
|
|
},
|
|
{
|
|
"variant": "none",
|
|
"columns": null,
|
|
"rows": 5000,
|
|
"messages": 11800,
|
|
"index_bytes": 0,
|
|
"index_bytes_per_message": 0.0,
|
|
"insert_us_per_message": [
|
|
4.35,
|
|
4.26,
|
|
4.32
|
|
],
|
|
"wal_bytes_per_message": [
|
|
333.9,
|
|
333.9,
|
|
333.9
|
|
],
|
|
"fpi_per_1000": [
|
|
18.0,
|
|
18.2,
|
|
18.2
|
|
],
|
|
"long_text": "ok"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"size": 10000,
|
|
"messages_total": 13500,
|
|
"rss_before_mib": 121.5,
|
|
"rss_after_mib": 127.6,
|
|
"bytes_per_message": 478,
|
|
"prefill_seconds": 27.2,
|
|
"prefill_rate": 497,
|
|
"cursors": 99,
|
|
"maintenance_seconds": 0.2,
|
|
"messages_rows": 13500,
|
|
"messages_table_bytes": 2449408,
|
|
"messages_indexes_bytes": 1974272,
|
|
"db_bytes_per_message": 328,
|
|
"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": 10,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.183,
|
|
"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": 50,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.173,
|
|
"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": 50,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.063,
|
|
"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": 50,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.065,
|
|
"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": 4713,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.732,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "read 10k",
|
|
"chat_size": 10000,
|
|
"page": "middle",
|
|
"after": 5000,
|
|
"source": "no-index",
|
|
"node": "Seq Scan on messages",
|
|
"shared_hit": 294,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 4.012,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "read 10k",
|
|
"chat_size": 10000,
|
|
"page": "middle",
|
|
"after": 5000,
|
|
"source": "chat_only",
|
|
"node": "Seq Scan on messages",
|
|
"shared_hit": 294,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 3.763,
|
|
"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.051,
|
|
"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": 48,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.165,
|
|
"kind": "generic"
|
|
},
|
|
{
|
|
"chat": "bg 1k",
|
|
"chat_size": 1000,
|
|
"page": "first",
|
|
"after": 0,
|
|
"source": "app",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 48,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.15,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 1k",
|
|
"chat_size": 1000,
|
|
"page": "middle",
|
|
"after": 500,
|
|
"source": "app",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 47,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.174,
|
|
"kind": "generic"
|
|
},
|
|
{
|
|
"chat": "bg 1k",
|
|
"chat_size": 1000,
|
|
"page": "middle",
|
|
"after": 500,
|
|
"source": "psql",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 47,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.056,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 1k",
|
|
"chat_size": 1000,
|
|
"page": "middle",
|
|
"after": 500,
|
|
"source": "generic",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 47,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.061,
|
|
"kind": "generic"
|
|
},
|
|
{
|
|
"chat": "bg 1k",
|
|
"chat_size": 1000,
|
|
"page": "middle",
|
|
"after": 500,
|
|
"source": "or-cursor",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 514,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.125,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 1k",
|
|
"chat_size": 1000,
|
|
"page": "middle",
|
|
"after": 500,
|
|
"source": "no-index",
|
|
"node": "Seq Scan on messages",
|
|
"shared_hit": 294,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.708,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 1k",
|
|
"chat_size": 1000,
|
|
"page": "middle",
|
|
"after": 500,
|
|
"source": "chat_only",
|
|
"node": "Bitmap Heap Scan on messages",
|
|
"shared_hit": 285,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.484,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 1k",
|
|
"chat_size": 1000,
|
|
"page": "middle",
|
|
"after": 500,
|
|
"source": "covering",
|
|
"node": "Index Only Scan using bench_variant on messages",
|
|
"shared_hit": 5,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.055,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 1k",
|
|
"chat_size": 1000,
|
|
"page": "last",
|
|
"after": 900,
|
|
"source": "app",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 48,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.136,
|
|
"kind": "generic"
|
|
},
|
|
{
|
|
"chat": "bg 100",
|
|
"chat_size": 100,
|
|
"page": "first",
|
|
"after": 0,
|
|
"source": "app",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 43,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.182,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 100",
|
|
"chat_size": 100,
|
|
"page": "first",
|
|
"after": 0,
|
|
"source": "psql",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 43,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.063,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 100",
|
|
"chat_size": 100,
|
|
"page": "first",
|
|
"after": 0,
|
|
"source": "generic",
|
|
"node": "Index Scan using ix_messages_chat_id_created_at_id on messages",
|
|
"shared_hit": 43,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.064,
|
|
"kind": "generic"
|
|
},
|
|
{
|
|
"chat": "bg 100",
|
|
"chat_size": 100,
|
|
"page": "first",
|
|
"after": 0,
|
|
"source": "no-index",
|
|
"node": "Seq Scan on messages",
|
|
"shared_hit": 294,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.403,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 100",
|
|
"chat_size": 100,
|
|
"page": "first",
|
|
"after": 0,
|
|
"source": "chat_only",
|
|
"node": "Bitmap Heap Scan on messages",
|
|
"shared_hit": 85,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.129,
|
|
"kind": "custom"
|
|
},
|
|
{
|
|
"chat": "bg 100",
|
|
"chat_size": 100,
|
|
"page": "first",
|
|
"after": 0,
|
|
"source": "covering",
|
|
"node": "Index Only Scan using bench_variant on messages",
|
|
"shared_hit": 5,
|
|
"shared_read": 0,
|
|
"rows": 51.0,
|
|
"time_ms": 0.055,
|
|
"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": 12,
|
|
"shared_read": 0,
|
|
"rows": 10.0,
|
|
"time_ms": 0.086,
|
|
"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": 12,
|
|
"shared_read": 0,
|
|
"rows": 10.0,
|
|
"time_ms": 0.028,
|
|
"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": 12,
|
|
"shared_read": 0,
|
|
"rows": 10.0,
|
|
"time_ms": 0.024,
|
|
"kind": "generic"
|
|
},
|
|
{
|
|
"chat": "bg 10",
|
|
"chat_size": 10,
|
|
"page": "first",
|
|
"after": 0,
|
|
"source": "no-index",
|
|
"node": "Seq Scan on messages",
|
|
"shared_hit": 294,
|
|
"shared_read": 0,
|
|
"rows": 10.0,
|
|
"time_ms": 0.329,
|
|
"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": 12,
|
|
"shared_read": 0,
|
|
"rows": 10.0,
|
|
"time_ms": 0.027,
|
|
"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.019,
|
|
"kind": "custom"
|
|
}
|
|
],
|
|
"rss_peak_mib": 185.0,
|
|
"write_cost": [
|
|
{
|
|
"variant": "app",
|
|
"columns": "(chat_id, created_at, id)",
|
|
"rows": 5000,
|
|
"messages": 16800,
|
|
"index_bytes": 999424,
|
|
"index_bytes_per_message": 59.5,
|
|
"insert_us_per_message": [
|
|
7.05,
|
|
5.21,
|
|
5.11
|
|
],
|
|
"wal_bytes_per_message": [
|
|
556.3,
|
|
542.6,
|
|
542.6
|
|
],
|
|
"fpi_per_1000": [
|
|
19.2,
|
|
31.2,
|
|
31.2
|
|
],
|
|
"long_text": "ok"
|
|
},
|
|
{
|
|
"variant": "chat_only",
|
|
"columns": "(chat_id)",
|
|
"rows": 5000,
|
|
"messages": 16800,
|
|
"index_bytes": 139264,
|
|
"index_bytes_per_message": 8.3,
|
|
"insert_us_per_message": [
|
|
4.9,
|
|
4.8,
|
|
4.83
|
|
],
|
|
"wal_bytes_per_message": [
|
|
458.0,
|
|
454.5,
|
|
454.5
|
|
],
|
|
"fpi_per_1000": [
|
|
27.6,
|
|
28.8,
|
|
29.0
|
|
],
|
|
"long_text": "ok"
|
|
},
|
|
{
|
|
"variant": "covering",
|
|
"columns": "(chat_id, created_at, id) INCLUDE (sender_id, text)",
|
|
"rows": 5000,
|
|
"messages": 16800,
|
|
"index_bytes": 2695168,
|
|
"index_bytes_per_message": 160.4,
|
|
"insert_us_per_message": [
|
|
5.88,
|
|
5.64,
|
|
5.72
|
|
],
|
|
"wal_bytes_per_message": [
|
|
754.6,
|
|
754.0,
|
|
752.6
|
|
],
|
|
"fpi_per_1000": [
|
|
35.0,
|
|
35.6,
|
|
35.6
|
|
],
|
|
"long_text": "index row requires 12072 bytes, maximum size is 8191"
|
|
},
|
|
{
|
|
"variant": "none",
|
|
"columns": null,
|
|
"rows": 5000,
|
|
"messages": 16800,
|
|
"index_bytes": 0,
|
|
"index_bytes_per_message": 0.0,
|
|
"insert_us_per_message": [
|
|
4.34,
|
|
4.79,
|
|
4.42
|
|
],
|
|
"wal_bytes_per_message": [
|
|
369.5,
|
|
368.1,
|
|
368.1
|
|
],
|
|
"fpi_per_1000": [
|
|
27.4,
|
|
27.6,
|
|
27.6
|
|
],
|
|
"long_text": "ok"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"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"
|
|
},
|
|
"haproxy": {
|
|
"nano_cpus": 1000000000,
|
|
"memory": 268435456,
|
|
"memory_swap": 268435456,
|
|
"published_ports": {},
|
|
"healthcheck": [
|
|
"CMD",
|
|
"bash",
|
|
"-c",
|
|
"exec 3<>/dev/tcp/127.0.0.1/8404 && printf 'GET /lb/ready HTTP/1.0\\r\\n\\r\\n' >&3 && head -n 1 <&3 | grep -q ' 200 '"
|
|
],
|
|
"log_driver": "local"
|
|
},
|
|
"k6": {
|
|
"nano_cpus": 0,
|
|
"memory": 0,
|
|
"memory_swap": 0,
|
|
"published_ports": {},
|
|
"healthcheck": null,
|
|
"log_driver": "local"
|
|
},
|
|
"api_replicas": 1,
|
|
"max_connections": 100
|
|
},
|
|
"stand": {
|
|
"api_tcp_rmem": "4096 131072 524288",
|
|
"postgres": {
|
|
"image": "postgres:18.6-trixie@sha256:5a5a84b19854a9ffaa54082c166ff4ec27473a361e496e5ea167f298f2da9722",
|
|
"id": "sha256:f4fcd2b983483177b15d72d94fb3614736211554f7cac5c2cc54a05c75110b90",
|
|
"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:5a6ac3cceea0d4cebe48911dfa5f393f49feea86a2c55c5ac6b0ba733a1713b6",
|
|
"version": "9.1.2",
|
|
"maxmemory": "67108864",
|
|
"maxmemory-clients": "0",
|
|
"maxmemory-eviction-tenacity": "10",
|
|
"maxmemory-policy": "allkeys-lru",
|
|
"maxmemory-samples": "5"
|
|
},
|
|
"haproxy": {
|
|
"image": "haproxy:3.4.6-trixie@sha256:e273915691a8eab3f105bf3e39fd4c29a4ecf334e33421903b5589d25e14db26",
|
|
"id": "sha256:a92cbb5d7b4ba27898706659bde5039cc86e4ebee44f243d410f268200f7406f",
|
|
"version": "HAProxy version 3.4.6-56332c5 2026/09/28 - https://haproxy.org/"
|
|
},
|
|
"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",
|
|
"S3__BUCKET": "bench",
|
|
"S3__HOST": "s3",
|
|
"S3__PORT": "8333"
|
|
}
|
|
},
|
|
"finished_at": "2026-10-31T20:26:59+00:00"
|
|
}
|