bench: record M4 results and raise queue API memory

This commit is contained in:
2026-12-04 18:23:23 +03:00
parent ee67725074
commit 831e3f7773
115 changed files with 17142 additions and 12 deletions
+748
View File
@@ -0,0 +1,748 @@
{
"kind": "queue",
"label": "baseline",
"started": "2026-12-04T11:43:08Z",
"profile": {
"name": "queue",
"configs": [
[
"c1p1",
1,
1
],
[
"c2p2",
2,
2
],
[
"c4p4",
4,
4
],
[
"c2p32",
2,
32
]
],
"classes": [
[
"s",
"noise",
320,
200,
50
],
[
"l",
"noise",
1800,
1800,
40
],
[
"x",
"flat",
6000,
6000,
20
]
],
"repeats": 2,
"window_s": 40.0,
"steady_factor": 0.6,
"overload_factor": 2.0,
"overload_fill": 1.5,
"overload_max_s": 150.0,
"fixed_rates": [
[
"s",
2.5
],
[
"l",
0.8
],
[
"x",
0.5
]
],
"backlog_limit": 60,
"fill_rates": [
[
"s",
25.0
],
[
"l",
4.0
],
[
"x",
10.0
]
],
"upload_timeout_s": 60.0,
"settle_timeout_s": 900.0,
"sample_interval_s": 1.0,
"seed": 20261105,
"api_replicas": 2,
"api_cpus": 1.0,
"api_memory": "512m",
"db_cpus": 1.0,
"cache_cpus": 0.5,
"lb_cpus": 0.5,
"s3_cpus": 1.0,
"s3_memory": "512m",
"mq_cpus": 1.0,
"mq_memory": "512m",
"worker_cpus": 2.0,
"worker_memory": "1536m",
"render_memory_mb": 768,
"gen_cpus": 1.0,
"gen_memory": "512m",
"session_ttl": 21600
},
"host": {
"platform": "macOS-26.6.2-arm64-arm-64bit-Mach-O",
"machine": "arm64",
"cpu_model": "Apple M4",
"cpu_count": 10,
"ram_gb": 16.0,
"swap_used_mib": 4784.88,
"power": "AC Power",
"memory_pressure": null,
"memory_free_percent": 37,
"swapouts": 5889009,
"loadavg_1m": 2.84
},
"docker": {
"ServerVersion": "28.0.4",
"OperatingSystem": "Docker Desktop",
"KernelVersion": "6.10.14-linuxkit",
"Architecture": "aarch64",
"NCPU": 10,
"MemTotal": 10419826688,
"CgroupVersion": "2",
"CgroupDriver": "cgroupfs",
"compose_version": "5.6.1",
"other_running_containers": []
},
"budget": {
"limits_cpus": 9.75,
"limits_memory_gib": 6.06,
"vm_cpus": 10,
"vm_memory_gib": 9.7
},
"host_warnings": [
"host swapped out 212 pages during the run"
],
"image": {
"tag": "mtusi-messenger-vladimirceva:bench-baseline",
"id": "sha256:33928786ed20056739b443afc7c1e9e331cee300166ee6db257bff63c7915412",
"created": "2026-12-04T10:21:43.484203295Z",
"src_sha256": "9f54713d40ab16487073215427ef36fc2826a073550f825cc5eb0902a5c2ad7e",
"versions": {
"python": "3.13.18",
"fastapi": "0.142.1",
"starlette": "1.7.0",
"uvicorn": "0.54.0",
"pydantic": "2.13.5",
"sqlalchemy": "2.1.1",
"asyncpg": "0.31.0",
"alembic": "1.20.0",
"redis": "8.1.0",
"argon2-cffi": "25.1.0",
"aiobotocore": "3.10.0",
"botocore": "1.43.117",
"aiohttp": "3.14.5"
},
"app_defaults": {
"pool_size": 10,
"pool_overflow": 5,
"pool_timeout": 5.0,
"operation_timeout": 6.0,
"statement_timeout_ms": 5000,
"auth": {
"argon2_memory_kib": 65536,
"argon2_iterations": 2,
"argon2_parallelism": 1,
"kdf_concurrency": 1,
"kdf_max_waiting": 16,
"kdf_wait_timeout": 2.0,
"login_window": 300,
"login_max_failures_per_account": 10,
"login_max_failures_per_address": 200
},
"keep_alive": 60,
"client_tls": true,
"shutdown_timeout": 5,
"s3_timeout": 5.0,
"s3_max_connections": 10,
"uploads": {
"max_concurrent": 4,
"max_waiting": 16,
"wait_timeout": 5.0,
"body_timeout": 30.0,
"max_unfinished": 300
},
"cleaner": {
"interval": 60.0,
"grace": 900,
"batch": 100,
"reconcile_interval": 3600,
"reconcile_page": 1000,
"reconcile_max_changes": 100,
"reconcile_rate": 2000.0,
"staging_retention": 86400
},
"pipeline": {
"concurrency": 2,
"prefetch": 2,
"max_attempts": 5,
"job_timeout": 60.0,
"lease_margin": 20.0,
"retry_base": 2.0,
"retry_max": 120.0,
"render_memory_mb": 768,
"stop_timeout": 8.0,
"fault": ""
},
"relay": {
"interval": 0.5,
"batch": 100,
"republish_after": 120.0,
"fault": ""
},
"malloc_mmap_threshold": "131072"
}
},
"code": {
"src_sha256": "9f54713d40ab16487073215427ef36fc2826a073550f825cc5eb0902a5c2ad7e",
"git_commit": "ee6772507433e3d587cde2f1f47390c5fab53b0b",
"git_dirty": false
},
"plan": [
{
"cell": "c2p2-x-r1",
"config": "c2p2",
"concurrency": 2,
"prefetch": 2,
"size_class": "x",
"repeat": 1,
"order": 1
},
{
"cell": "c4p4-s-r1",
"config": "c4p4",
"concurrency": 4,
"prefetch": 4,
"size_class": "s",
"repeat": 1,
"order": 2
},
{
"cell": "c2p32-s-r1",
"config": "c2p32",
"concurrency": 2,
"prefetch": 32,
"size_class": "s",
"repeat": 1,
"order": 3
},
{
"cell": "c4p4-l-r1",
"config": "c4p4",
"concurrency": 4,
"prefetch": 4,
"size_class": "l",
"repeat": 1,
"order": 4
},
{
"cell": "c4p4-x-r1",
"config": "c4p4",
"concurrency": 4,
"prefetch": 4,
"size_class": "x",
"repeat": 1,
"order": 5
},
{
"cell": "c2p2-l-r1",
"config": "c2p2",
"concurrency": 2,
"prefetch": 2,
"size_class": "l",
"repeat": 1,
"order": 6
},
{
"cell": "c2p32-x-r1",
"config": "c2p32",
"concurrency": 2,
"prefetch": 32,
"size_class": "x",
"repeat": 1,
"order": 7
},
{
"cell": "c2p2-s-r1",
"config": "c2p2",
"concurrency": 2,
"prefetch": 2,
"size_class": "s",
"repeat": 1,
"order": 8
},
{
"cell": "c1p1-x-r1",
"config": "c1p1",
"concurrency": 1,
"prefetch": 1,
"size_class": "x",
"repeat": 1,
"order": 9
},
{
"cell": "c1p1-l-r1",
"config": "c1p1",
"concurrency": 1,
"prefetch": 1,
"size_class": "l",
"repeat": 1,
"order": 10
},
{
"cell": "c1p1-s-r1",
"config": "c1p1",
"concurrency": 1,
"prefetch": 1,
"size_class": "s",
"repeat": 1,
"order": 11
},
{
"cell": "c2p32-l-r1",
"config": "c2p32",
"concurrency": 2,
"prefetch": 32,
"size_class": "l",
"repeat": 1,
"order": 12
},
{
"cell": "c2p32-x-r2",
"config": "c2p32",
"concurrency": 2,
"prefetch": 32,
"size_class": "x",
"repeat": 2,
"order": 13
},
{
"cell": "c2p2-s-r2",
"config": "c2p2",
"concurrency": 2,
"prefetch": 2,
"size_class": "s",
"repeat": 2,
"order": 14
},
{
"cell": "c4p4-x-r2",
"config": "c4p4",
"concurrency": 4,
"prefetch": 4,
"size_class": "x",
"repeat": 2,
"order": 15
},
{
"cell": "c1p1-x-r2",
"config": "c1p1",
"concurrency": 1,
"prefetch": 1,
"size_class": "x",
"repeat": 2,
"order": 16
},
{
"cell": "c2p2-l-r2",
"config": "c2p2",
"concurrency": 2,
"prefetch": 2,
"size_class": "l",
"repeat": 2,
"order": 17
},
{
"cell": "c2p2-x-r2",
"config": "c2p2",
"concurrency": 2,
"prefetch": 2,
"size_class": "x",
"repeat": 2,
"order": 18
},
{
"cell": "c1p1-l-r2",
"config": "c1p1",
"concurrency": 1,
"prefetch": 1,
"size_class": "l",
"repeat": 2,
"order": 19
},
{
"cell": "c1p1-s-r2",
"config": "c1p1",
"concurrency": 1,
"prefetch": 1,
"size_class": "s",
"repeat": 2,
"order": 20
},
{
"cell": "c4p4-l-r2",
"config": "c4p4",
"concurrency": 4,
"prefetch": 4,
"size_class": "l",
"repeat": 2,
"order": 21
},
{
"cell": "c4p4-s-r2",
"config": "c4p4",
"concurrency": 4,
"prefetch": 4,
"size_class": "s",
"repeat": 2,
"order": 22
},
{
"cell": "c2p32-l-r2",
"config": "c2p32",
"concurrency": 2,
"prefetch": 32,
"size_class": "l",
"repeat": 2,
"order": 23
},
{
"cell": "c2p32-s-r2",
"config": "c2p32",
"concurrency": 2,
"prefetch": 32,
"size_class": "s",
"repeat": 2,
"order": 24
}
],
"upload_slack": 8,
"bodies": {
"s": {
"kind": "noise",
"width": 320,
"height": 200,
"bytes": 192323,
"sha256": "dd245db29b537d420390fac805135b7a6a93c04d289e7d8d8265deb28f27d4df"
},
"l": {
"kind": "noise",
"width": 1800,
"height": 1800,
"bytes": 9724823,
"sha256": "cd5dd6eae6c4a6c88adcde2276157b649970a3d65f8f0cc69e2c5eeed341ad32"
},
"x": {
"kind": "flat",
"width": 6000,
"height": 6000,
"bytes": 119755,
"sha256": "0652f72ddb1d240172e8f0f4598ab72c29a0da365c9e822a5842b64ec6109a9a"
}
},
"app_env": {
"c2p2": {
"DB_POOL_OVERFLOW": "1",
"DB_POOL_SIZE": "2",
"JOB_MAX_ATTEMPTS": "5",
"JOB_TIMEOUT_SECONDS": "60",
"LOG_LEVEL": "INFO",
"RENDER_MEMORY_MB": "768",
"WORKER_CONCURRENCY": "2",
"WORKER_PREFETCH": "2"
},
"c4p4": {
"DB_POOL_OVERFLOW": "1",
"DB_POOL_SIZE": "2",
"JOB_MAX_ATTEMPTS": "5",
"JOB_TIMEOUT_SECONDS": "60",
"LOG_LEVEL": "INFO",
"RENDER_MEMORY_MB": "768",
"WORKER_CONCURRENCY": "4",
"WORKER_PREFETCH": "4"
},
"c2p32": {
"DB_POOL_OVERFLOW": "1",
"DB_POOL_SIZE": "2",
"JOB_MAX_ATTEMPTS": "5",
"JOB_TIMEOUT_SECONDS": "60",
"LOG_LEVEL": "INFO",
"RENDER_MEMORY_MB": "768",
"WORKER_CONCURRENCY": "2",
"WORKER_PREFETCH": "32"
}
},
"cells": {
"c2p2-x-r1": {
"worker_id": "8e6453a8fad2adfd6184f89c0a1b07aa68b48dfc34ff0db242c02a5ebdfaddcd",
"marks": {
"drain": 1796384622.383771,
"worker_start": 1796384625.402732,
"steady": 1796384633.498001,
"fixed": 1796384674.56369,
"overload": 1796384714.69735,
"recovery": 1796384755.401387,
"end": 1796384801.177606
},
"consuming_ts": 1796384626.106,
"memory_peak_bytes": 702283776,
"timeline_samples": 179,
"timeline_failures": 0
},
"c4p4-s-r1": {
"worker_id": "859edb4d5d8f9465c37671b386cb0c0d8d52f47eb05d6d41868e840c875a8c24",
"marks": {
"drain": 1796384802.891868,
"worker_start": 1796384806.618695,
"steady": 1796384811.882755,
"fixed": 1796384853.343494,
"overload": 1796384894.469175,
"recovery": 1796384935.217038,
"end": 1796384961.455271
},
"consuming_ts": 1796384807.343,
"memory_peak_bytes": 155418624,
"timeline_samples": 159,
"timeline_failures": 0
},
"c2p32-s-r1": {
"worker_id": "487ac977f94ac82386ff4b4f3227d7e173fcb3aa3fff7b540c68ebe6523ef466",
"marks": {
"drain": 1796384963.236386,
"worker_start": 1796384966.91979,
"steady": 1796384972.102625,
"fixed": 1796385013.573557,
"overload": 1796385054.636686,
"recovery": 1796385095.471959,
"end": 1796385116.36967
},
"consuming_ts": 1796384967.642,
"memory_peak_bytes": 123170816,
"timeline_samples": 154,
"timeline_failures": 0
}
},
"stand": {
"postgres": {
"image": "postgres:18.7-trixie@sha256:64c8b0d31e4ab6ea665e8426ea406a94bf52de3c05b3a4a8bf713704eefa9328",
"version": "18.7 (Debian 18.7-1.pgdg13+5)",
"settings": {
"checkpoint_timeout": "5min",
"fsync": "on",
"jit": "on",
"max_connections": "100",
"max_wal_size": "1GB",
"password_encryption": "scram-sha-256",
"shared_buffers": "128MB",
"synchronous_commit": "on",
"wal_level": "replica"
}
},
"valkey": {
"image": "valkey/valkey:9.1.4-trixie@sha256:3ab0eca823ebbf0fe352476ebac330ac9e5f14b592b9a954eab296d341e81b0e",
"version": "9.1.4"
},
"haproxy": {
"image": "haproxy:3.4.8-trixie@sha256:3e4e390ccc7208326607be371f4d14f6296af5cdb414315fadff50c5d785a478"
},
"tls": {
"ingress": "https",
"lb_to_api": "mtls",
"pki": "per-run CA",
"generator_url": "https://ingress:8443",
"storages": "tls1.3, per-run CA, name check"
},
"storage_auth": {
"postgres": {
"api": "role api",
"worker": "role worker",
"relay": "role relay",
"cleaner": "role cleaner",
"migrate": "role migrate (schema owner)",
"bootstrap": "superuser (postgres-bootstrap)",
"orchestrator": "superuser via the container socket"
},
"valkey": {
"api": "acl user api",
"orchestrator": "acl user operator",
"default": "off"
},
"login_before": "postgres: role api; valkey: no username (default is off)"
},
"secrets": {
"store": "per-run openbao (raft, mtls1.3, per-run CA)",
"login": "cert auth by the process certificate, a policy per process",
"token": "600 s, max 3600 s",
"login_before": "environment of the replicas (the code before openbao)",
"operator": "the run itself (scripts/lab7.py bao-ready, init on every fresh stand); materials in the per-run temporary directory 0700, removed at the end",
"image": "openbao/openbao:2.7.3@sha256:ba4b133eb9586630024e71a617e66f37f29cc3534cdd46a6233e098ceded8dc9"
},
"limits": {
"api": {
"nano_cpus": 1000000000,
"memory": 536870912,
"memory_swap": 536870912,
"published_ports": {}
},
"postgres": {
"nano_cpus": 1000000000,
"memory": 1073741824,
"memory_swap": 1073741824,
"published_ports": {}
},
"valkey": {
"nano_cpus": 500000000,
"memory": 134217728,
"memory_swap": 134217728,
"published_ports": {}
},
"haproxy": {
"nano_cpus": 500000000,
"memory": 268435456,
"memory_swap": 268435456,
"published_ports": {}
},
"openbao": {
"nano_cpus": 250000000,
"memory": 268435456,
"memory_swap": 268435456,
"published_ports": {
"8200/tcp": [
{
"HostIp": "127.0.0.1",
"HostPort": "52050"
}
]
}
},
"s3": {
"nano_cpus": 1000000000,
"memory": 536870912,
"memory_swap": 536870912,
"published_ports": {}
},
"rabbitmq": {
"nano_cpus": 1000000000,
"memory": 536870912,
"memory_swap": 536870912,
"published_ports": {}
},
"relay": {
"nano_cpus": 250000000,
"memory": 201326592,
"memory_swap": 201326592,
"published_ports": {}
},
"worker": {
"nano_cpus": 2000000000,
"memory": 1610612736,
"memory_swap": 1610612736,
"published_ports": {}
}
},
"api_replicas": 2,
"app_env": {
"APP_HOST": "0.0.0.0",
"APP_PORT": "8080",
"BAO_ADDR": "https://openbao:8200",
"BAO_CERT_FILE": "/run/secrets/api-client.crt",
"BAO_CRL_FILE": "/run/secrets/crl.pem",
"BAO_KEY_FILE": "/run/secrets/api-client.key",
"CACHE_HOST": "valkey",
"CACHE_PORT": "6379",
"CACHE_USER": "api",
"CLIENT_TLS_CA_FILE": "/run/secrets/ca.crt",
"DB_HOST": "postgres",
"DB_NAME": "bench",
"DB_PORT": "5432",
"DB_USER": "api",
"IDEMPOTENCY_TTL_SECONDS": "86400",
"LOG_LEVEL": "INFO",
"MALLOC_MMAP_THRESHOLD_": "131072",
"S3_BUCKET": "bench",
"S3_ENDPOINT": "https://s3:8333",
"SESSION_TTL_SECONDS": "21600",
"SHUTDOWN_TIMEOUT": "5",
"TLS_ALLOWED_CLIENTS": "haproxy",
"TLS_CA_FILE": "/run/secrets/ca.crt",
"TLS_CERT_FILE": "/run/secrets/api.crt",
"TLS_CLIENT_AUTH": "true",
"TLS_CRL_FILE": "/run/secrets/crl.pem",
"TLS_KEY_FILE": "/run/secrets/api.key",
"UPLOAD_MAX_UNFINISHED": "60"
},
"api_tcp_rmem": "4096 131072 524288",
"s3": {
"image": "chrislusf/seaweedfs:4.48@sha256:4e61d15fd35994cb1e43e1e553dff106794841fd9a99ade2fc8c8bfce4d7872d",
"command": [
"server",
"-ip=127.0.0.1",
"-ip.bind=127.0.0.1",
"-master.telemetry=false",
"-master.electionTimeout=1s",
"-volume.preStopSeconds=0",
"-filer",
"-s3",
"-s3.ip.bind=0.0.0.0",
"-s3.port=8333",
"-s3.port.iceberg=0",
"-s3.port.lance=0",
"-s3.iam=false",
"-s3.concurrentUploadLimitMB=64",
"-s3.cert.file=/run/secrets/s3.crt",
"-s3.key.file=/run/secrets/s3.key"
]
},
"rabbitmq": {
"image": "rabbitmq:4.3.7-alpine@sha256:b1f997f74103d08fc1f20a13890dc44fe6cfa51d528cf521b480ada988d3ffa5",
"version": "4.3.7",
"connections": [
"relay true tlsv1.3 EXTERNAL",
"worker true tlsv1.3 EXTERNAL"
]
},
"broker_tls": {
"transport": "mtls1.3, per-run CA and CRL, no plain AMQP listener",
"login": "EXTERNAL by certificate DNS SAN",
"users": {
"relay": "configure own queue, publish via default exchange",
"worker": "consume own queue only"
}
}
},
"aborted": "StandError: c4p4-l-r1: no ready job after the drain:\n2026-12-04T11:51:57.812Z INFO src.secrets_store [rid=-] process secrets loaded process=worker role=worker address=https://openbao:8200 versions=postgres/worker:1,s3/worker:1 token_ttl=600s policies=worker waited=0.0s\n2026-12-04T11:51:57.850Z INFO src.worker [rid=-] worker started queue=bench.attachment-jobs concurrency=4 prefetch=4 max_attempts=5 job_timeout=60s lease=80s retry=2..120s render_memory=768MiB db=postgres:5432/bench pool=2 s3=https://s3:8333 broker=rabbitmq:5671 fault=- telemetry=off\n2026-12-04T11:51:57.858Z INFO src.broker [rid=-] broker consuming queue=bench.attachment-jobs prefetch=4\n2026-12-04T11:51:58.148Z INFO src.worker [rid=-] worker stopped exit_code=0 cancelled=0 returned=0\n2026-12-04T11:52:09.698Z INFO src.secrets_store [rid=-] process secrets loaded process=worker role=worker address=https://openbao:8200 versions=postgres/worker:1,s3/worker:1 token_ttl=600s policies=worker waited=0.0s\n2026-12-04T11:52:09.740Z INFO src.worker [rid=-] worker started queue=bench.attachment-jobs concurrency=4 prefetch=4 max_attempts=5 job_timeout=60s lease=80s retry=2..120s render_memory=768MiB db=postgres:5432/bench pool=2 s3=https://s3:8333 broker=rabbitmq:5671 fault=- telemetry=off\n2026-12-04T11:52:09.748Z INFO src.broker [rid=-] broker consuming queue=bench.attachment-jobs prefetch=4\n",
"finished": "2026-12-04T11:52:26Z",
"host_state_end": {
"slept_seconds": 0.0,
"swapouts_start": 5889009,
"swapouts_end": 5889221,
"power_end": "AC Power",
"swapouts_delta": 212
}
}