From 9caa0313be1b816e49e651dbdc2cd1104e163483 Mon Sep 17 00:00:00 2001 From: Ilya Date: Fri, 23 Oct 2026 17:18:54 +0300 Subject: [PATCH] =?UTF-8?q?lab4:=20=D0=B1=D0=B5=D0=BD=D1=87=D0=BC=D0=B0?= =?UTF-8?q?=D1=80=D0=BA=20=E2=80=94=20=D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE?= =?UTF-8?q?=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8C=20=D0=BD=D0=B0=20=D0=BF?= =?UTF-8?q?=D0=BE=D1=82=D0=BE=D0=BA,=20=D1=85=D1=83=D0=B4=D1=88=D0=B8?= =?UTF-8?q?=D0=B9=20=D0=B2=D1=85=D0=BE=D0=B4,=20=D0=BA=D0=BB=D0=B0=D1=81?= =?UTF-8?q?=D1=81=D0=B8=D1=84=D0=B8=D0=BA=D0=B0=D1=86=D0=B8=D1=8F=20=D0=BE?= =?UTF-8?q?=D1=82=D0=BA=D0=B0=D0=B7=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- evidence/lab4/bench/direct-1048576-c10.json | 285 ++++++++++---------- evidence/lab4/bench/direct-131072-c10.json | 242 ++++++++--------- evidence/lab4/bench/direct-9961472-c10.json | 270 ++++++++++--------- evidence/lab4/bench/direct-worst-c32.json | 217 +++++++++++++++ evidence/lab4/bench/proxy-1048576-c10.json | 186 ++++++------- evidence/lab4/bench/proxy-131072-c10.json | 268 +++++++++--------- evidence/lab4/bench/proxy-9961472-c10.json | 192 ++++++------- evidence/lab4/bench/proxy-9961472-c20.json | 192 ++++++------- evidence/lab4/bench/proxy-worst-c32.json | 207 ++++++++++++++ evidence/lab4/decode-memory.txt | 15 +- evidence/lab4/direct-ttl-short.txt | 6 +- evidence/lab4/make-test-dependencies.txt | 6 +- evidence/lab4/make-test-e2e.txt | 6 +- evidence/lab4/summary.md | 20 +- evidence/lab4/unit-tests.txt | 12 +- scripts/lab4/attachments_bench.py | 91 ++++--- scripts/lab4/run_matrix.sh | 5 +- 17 files changed, 1343 insertions(+), 877 deletions(-) create mode 100644 evidence/lab4/bench/direct-worst-c32.json create mode 100644 evidence/lab4/bench/proxy-worst-c32.json diff --git a/evidence/lab4/bench/direct-1048576-c10.json b/evidence/lab4/bench/direct-1048576-c10.json index 641fc4b..070e304 100644 --- a/evidence/lab4/bench/direct-1048576-c10.json +++ b/evidence/lab4/bench/direct-1048576-c10.json @@ -1,214 +1,215 @@ { - "date": "2026-10-23T13:37:36+00:00", - "git": "4badd5a", + "date": "2026-10-23T14:14:08+00:00", + "git": "4b53e03", "params": { "mode": "direct", "size_bytes": 1048576, "concurrency": 10, "uploads_per_worker": 5, - "repeat": 3 + "repeat": 3, + "users": 10, + "image": null }, "host": { "nproc": 8, "mem_total_bytes": 16538955776 }, "api_container_limits_nanocpus_memory": [ - "1500000000 805306368", - "1500000000 805306368" + "1500000000 1073741824", + "1500000000 1073741824" ], "repeats": [ { "uploads": 50, "succeeded": 50, "failed": 0, - "duration_s": 0.97, + "duration_s": 0.499, "latency_ms": { - "p50": 159.8, - "p95": 252.1, - "p99": 272.0 + "p50": 75.9, + "p95": 103.8, + "p99": 130.9 }, "replicas": [ { - "instance_id": "7c7cf67931e5", - "delta_rx_bytes": 31673930, - "delta_tx_bytes": 203789, - "baseline_rss_bytes": 233545728, + "instance_id": "90e2e1d73b23", + "delta_rx_bytes": 27463858, + "delta_tx_bytes": 202183, + "baseline_rss_bytes": 178360320, "peak_memory_bytes": { - "rss": 236560384, - "heap_used": 54194600, - "external": 35034666, - "array_buffers": 31244322 + "rss": 201052160, + "heap_used": 56368848, + "external": 36994298, + "array_buffers": 33183530 }, - "delta_rss_bytes": 3014656, - "counters": { - "attachments.count_pending_direct": 20, - "attachments.insert_pending": 20, - "attachments.direct.initiated": 20, - "attachments.find_for_complete": 30, - "attachments.direct.verify_bytes": 31457280, - "attachments.decode.ms": 1724.6966849999153, - "attachments.mark_ready": 30, - "attachments.direct.completed": 30 - } - }, - { - "instance_id": "ff9a363e52b1", - "delta_rx_bytes": 21149099, - "delta_tx_bytes": 198366, - "baseline_rss_bytes": 268025856, - "peak_memory_bytes": { - "rss": 269074432, - "heap_used": 54788360, - "external": 25616254, - "array_buffers": 21825910 - }, - "delta_rss_bytes": 1048576, - "counters": { - "attachments.count_pending_direct": 30, - "attachments.insert_pending": 30, - "attachments.direct.initiated": 30, - "attachments.find_for_complete": 20, - "attachments.direct.verify_bytes": 20971520, - "attachments.decode.ms": 688.2958910000743, - "attachments.mark_ready": 20, - "attachments.direct.completed": 20 - } - } - ], - "total_delta_rx_bytes": 52823029, - "total_delta_tx_bytes": 402155, - "rx_bytes_per_upload": 1056461, - "tx_bytes_per_upload": 8043, - "max_delta_rss_bytes": 3014656 - }, - { - "uploads": 50, - "succeeded": 50, - "failed": 0, - "duration_s": 0.9, - "latency_ms": { - "p50": 141.1, - "p95": 244.2, - "p99": 270.7 - }, - "replicas": [ - { - "instance_id": "7c7cf67931e5", - "delta_rx_bytes": 27465799, - "delta_tx_bytes": 191310, - "baseline_rss_bytes": 236560384, - "peak_memory_bytes": { - "rss": 236953600, - "heap_used": 54493200, - "external": 30789946, - "array_buffers": 26999410 - }, - "delta_rss_bytes": 393216, + "delta_rss_bytes": 22691840, "counters": { "attachments.count_pending_direct": 24, "attachments.insert_pending": 24, "attachments.direct.initiated": 24, "attachments.find_for_complete": 26, "attachments.direct.verify_bytes": 27262976, - "attachments.decode.ms": 1384.4109410000383, + "attachments.decode.ms": 193.75719499992556, "attachments.mark_ready": 26, "attachments.direct.completed": 26 } }, { - "instance_id": "ff9a363e52b1", - "delta_rx_bytes": 25357866, - "delta_tx_bytes": 191558, - "baseline_rss_bytes": 269074432, + "instance_id": "9bb9a19b4693", + "delta_rx_bytes": 25359117, + "delta_tx_bytes": 199445, + "baseline_rss_bytes": 184389632, "peak_memory_bytes": { - "rss": 270516224, - "heap_used": 54339648, - "external": 30902899, - "array_buffers": 27112555 + "rss": 192516096, + "heap_used": 53666840, + "external": 28723916, + "array_buffers": 24917693 }, - "delta_rss_bytes": 1441792, + "delta_rss_bytes": 8126464, "counters": { "attachments.count_pending_direct": 26, "attachments.insert_pending": 26, "attachments.direct.initiated": 26, "attachments.find_for_complete": 24, "attachments.direct.verify_bytes": 25165824, - "attachments.decode.ms": 1058.1902670000563, + "attachments.decode.ms": 152.91470899997512, "attachments.mark_ready": 24, "attachments.direct.completed": 24 } } ], - "total_delta_rx_bytes": 52823665, - "total_delta_tx_bytes": 382868, - "rx_bytes_per_upload": 1056473, - "tx_bytes_per_upload": 7657, - "max_delta_rss_bytes": 1441792 + "total_delta_rx_bytes": 52822975, + "total_delta_tx_bytes": 401628, + "rx_bytes_per_upload": 1056460, + "tx_bytes_per_upload": 8033, + "max_delta_rss_bytes": 22691840 }, { "uploads": 50, "succeeded": 50, "failed": 0, - "duration_s": 0.969, + "duration_s": 0.528, "latency_ms": { - "p50": 154.4, - "p95": 274.5, - "p99": 328.1 + "p50": 75.6, + "p95": 106.0, + "p99": 124.3 }, "replicas": [ { - "instance_id": "7c7cf67931e5", - "delta_rx_bytes": 24307994, - "delta_tx_bytes": 188454, - "baseline_rss_bytes": 236953600, + "instance_id": "90e2e1d73b23", + "delta_rx_bytes": 26408075, + "delta_tx_bytes": 188162, + "baseline_rss_bytes": 201052160, "peak_memory_bytes": { - "rss": 236953600, - "heap_used": 53822176, - "external": 29735853, - "array_buffers": 25943144 + "rss": 209047552, + "heap_used": 59470168, + "external": 43348610, + "array_buffers": 39528755 }, - "delta_rss_bytes": 0, + "delta_rss_bytes": 7995392, "counters": { - "attachments.count_pending_direct": 27, - "attachments.insert_pending": 27, - "attachments.direct.initiated": 27, - "attachments.find_for_complete": 23, - "attachments.direct.verify_bytes": 24117248, - "attachments.decode.ms": 1452.813747000182, - "attachments.mark_ready": 23, - "attachments.direct.completed": 23 + "attachments.count_pending_direct": 25, + "attachments.insert_pending": 25, + "attachments.direct.initiated": 25, + "attachments.find_for_complete": 25, + "attachments.direct.verify_bytes": 26214400, + "attachments.decode.ms": 129.85774100001436, + "attachments.mark_ready": 25, + "attachments.direct.completed": 25 } }, { - "instance_id": "ff9a363e52b1", - "delta_rx_bytes": 28514629, - "delta_tx_bytes": 189117, - "baseline_rss_bytes": 270516224, + "instance_id": "9bb9a19b4693", + "delta_rx_bytes": 26411366, + "delta_tx_bytes": 196214, + "baseline_rss_bytes": 189214720, "peak_memory_bytes": { - "rss": 271433728, - "heap_used": 54290488, - "external": 34042295, - "array_buffers": 30251951 + "rss": 206053376, + "heap_used": 55771464, + "external": 29767218, + "array_buffers": 25958693 }, - "delta_rss_bytes": 917504, + "delta_rss_bytes": 16838656, "counters": { - "attachments.claim_expired": 1, - "attachments.count_pending_direct": 23, - "attachments.insert_pending": 23, - "attachments.direct.initiated": 23, - "attachments.find_for_complete": 27, - "attachments.direct.verify_bytes": 28311552, - "attachments.decode.ms": 1425.6747240000404, - "attachments.mark_ready": 27, - "attachments.direct.completed": 27 + "attachments.count_pending_direct": 25, + "attachments.insert_pending": 25, + "attachments.direct.initiated": 25, + "attachments.find_for_complete": 25, + "attachments.direct.verify_bytes": 26214400, + "attachments.decode.ms": 134.29743300002883, + "attachments.mark_ready": 25, + "attachments.direct.completed": 25 } } ], - "total_delta_rx_bytes": 52822623, - "total_delta_tx_bytes": 377571, - "rx_bytes_per_upload": 1056452, - "tx_bytes_per_upload": 7551, - "max_delta_rss_bytes": 917504 + "total_delta_rx_bytes": 52819441, + "total_delta_tx_bytes": 384376, + "rx_bytes_per_upload": 1056389, + "tx_bytes_per_upload": 7688, + "max_delta_rss_bytes": 16838656 + }, + { + "uploads": 50, + "succeeded": 50, + "failed": 0, + "duration_s": 0.499, + "latency_ms": { + "p50": 71.8, + "p95": 96.8, + "p99": 111.2 + }, + "replicas": [ + { + "instance_id": "90e2e1d73b23", + "delta_rx_bytes": 25354317, + "delta_tx_bytes": 184357, + "baseline_rss_bytes": 190746624, + "peak_memory_bytes": { + "rss": 192581632, + "heap_used": 53105536, + "external": 22274012, + "array_buffers": 18470057 + }, + "delta_rss_bytes": 1835008, + "counters": { + "attachments.count_pending_direct": 26, + "attachments.insert_pending": 26, + "attachments.direct.initiated": 26, + "attachments.find_for_complete": 24, + "attachments.direct.verify_bytes": 25165824, + "attachments.decode.ms": 120.24603700000443, + "attachments.mark_ready": 24, + "attachments.direct.completed": 24 + } + }, + { + "instance_id": "9bb9a19b4693", + "delta_rx_bytes": 27462079, + "delta_tx_bytes": 189327, + "baseline_rss_bytes": 206053376, + "peak_memory_bytes": { + "rss": 206053376, + "heap_used": 53308280, + "external": 30828871, + "array_buffers": 23867652 + }, + "delta_rss_bytes": 0, + "counters": { + "attachments.count_pending_direct": 24, + "attachments.insert_pending": 24, + "attachments.direct.initiated": 24, + "attachments.find_for_complete": 26, + "attachments.direct.verify_bytes": 27262976, + "attachments.decode.ms": 152.01662400003988, + "attachments.mark_ready": 26, + "attachments.direct.completed": 26 + } + } + ], + "total_delta_rx_bytes": 52816396, + "total_delta_tx_bytes": 373684, + "rx_bytes_per_upload": 1056328, + "tx_bytes_per_upload": 7474, + "max_delta_rss_bytes": 1835008 } ] } diff --git a/evidence/lab4/bench/direct-131072-c10.json b/evidence/lab4/bench/direct-131072-c10.json index 896afa4..da94832 100644 --- a/evidence/lab4/bench/direct-131072-c10.json +++ b/evidence/lab4/bench/direct-131072-c10.json @@ -1,213 +1,215 @@ { - "date": "2026-10-23T13:37:23+00:00", - "git": "4badd5a", + "date": "2026-10-23T14:13:55+00:00", + "git": "4b53e03", "params": { "mode": "direct", "size_bytes": 131072, "concurrency": 10, "uploads_per_worker": 5, - "repeat": 3 + "repeat": 3, + "users": 10, + "image": null }, "host": { "nproc": 8, "mem_total_bytes": 16538955776 }, "api_container_limits_nanocpus_memory": [ - "1500000000 805306368", - "1500000000 805306368" + "1500000000 1073741824", + "1500000000 1073741824" ], "repeats": [ { "uploads": 50, "succeeded": 50, "failed": 0, - "duration_s": 0.413, + "duration_s": 0.243, "latency_ms": { - "p50": 72.1, - "p95": 114.3, - "p99": 142.9 + "p50": 43.7, + "p95": 53.9, + "p99": 61.8 }, "replicas": [ { - "instance_id": "7c7cf67931e5", - "delta_rx_bytes": 3172654, - "delta_tx_bytes": 183439, - "baseline_rss_bytes": 224358400, + "instance_id": "90e2e1d73b23", + "delta_rx_bytes": 3172400, + "delta_tx_bytes": 183678, + "baseline_rss_bytes": 156618752, "peak_memory_bytes": { - "rss": 224620544, - "heap_used": 49708416, - "external": 6066500, - "array_buffers": 2276156 + "rss": 158715904, + "heap_used": 54191144, + "external": 9449376, + "array_buffers": 5653126 }, - "delta_rss_bytes": 262144, + "delta_rss_bytes": 2097152, "counters": { "attachments.count_pending_direct": 27, "attachments.insert_pending": 27, "attachments.direct.initiated": 27, "attachments.find_for_complete": 23, "attachments.direct.verify_bytes": 3014656, - "attachments.decode.ms": 395.56102700001793, + "attachments.decode.ms": 76.10400699995807, "attachments.mark_ready": 23, "attachments.direct.completed": 23 } }, { - "instance_id": "ff9a363e52b1", - "delta_rx_bytes": 3707235, - "delta_tx_bytes": 187659, - "baseline_rss_bytes": 255918080, + "instance_id": "9bb9a19b4693", + "delta_rx_bytes": 3707187, + "delta_tx_bytes": 186902, + "baseline_rss_bytes": 156594176, "peak_memory_bytes": { - "rss": 257359872, - "heap_used": 50212920, - "external": 8800241, - "array_buffers": 5009897 + "rss": 157773824, + "heap_used": 53887688, + "external": 8848676, + "array_buffers": 5052846 }, - "delta_rss_bytes": 1441792, + "delta_rss_bytes": 1179648, "counters": { "attachments.count_pending_direct": 23, "attachments.insert_pending": 23, "attachments.direct.initiated": 23, "attachments.find_for_complete": 27, "attachments.direct.verify_bytes": 3538944, - "attachments.decode.ms": 743.5491730003268, + "attachments.decode.ms": 104.25295099997311, "attachments.mark_ready": 27, "attachments.direct.completed": 27 } } ], - "total_delta_rx_bytes": 6879889, - "total_delta_tx_bytes": 371098, - "rx_bytes_per_upload": 137598, - "tx_bytes_per_upload": 7422, - "max_delta_rss_bytes": 1441792 + "total_delta_rx_bytes": 6879587, + "total_delta_tx_bytes": 370580, + "rx_bytes_per_upload": 137592, + "tx_bytes_per_upload": 7412, + "max_delta_rss_bytes": 2097152 }, { "uploads": 50, "succeeded": 50, "failed": 0, - "duration_s": 0.434, + "duration_s": 0.277, "latency_ms": { - "p50": 82.0, - "p95": 119.6, - "p99": 136.5 + "p50": 44.7, + "p95": 89.7, + "p99": 95.4 }, "replicas": [ { - "instance_id": "7c7cf67931e5", - "delta_rx_bytes": 3572309, - "delta_tx_bytes": 186069, - "baseline_rss_bytes": 224620544, + "instance_id": "90e2e1d73b23", + "delta_rx_bytes": 3172155, + "delta_tx_bytes": 182647, + "baseline_rss_bytes": 158715904, "peak_memory_bytes": { - "rss": 224751616, - "heap_used": 49977872, - "external": 6204496, - "array_buffers": 2414152 + "rss": 159240192, + "heap_used": 54550992, + "external": 9440830, + "array_buffers": 5644565 }, - "delta_rss_bytes": 131072, + "delta_rss_bytes": 524288, "counters": { - "attachments.count_pending_direct": 24, - "attachments.insert_pending": 24, - "attachments.direct.initiated": 24, - "attachments.find_for_complete": 26, - "attachments.direct.verify_bytes": 3407872, - "attachments.decode.ms": 610.345750999928, - "attachments.mark_ready": 26, - "attachments.direct.completed": 26 + "attachments.count_pending_direct": 27, + "attachments.insert_pending": 27, + "attachments.direct.initiated": 27, + "attachments.find_for_complete": 23, + "attachments.direct.verify_bytes": 3014656, + "attachments.decode.ms": 78.99052299992763, + "attachments.mark_ready": 23, + "attachments.direct.completed": 23 } }, { - "instance_id": "ff9a363e52b1", - "delta_rx_bytes": 3306233, - "delta_tx_bytes": 183451, - "baseline_rss_bytes": 257359872, + "instance_id": "9bb9a19b4693", + "delta_rx_bytes": 3706467, + "delta_tx_bytes": 186009, + "baseline_rss_bytes": 157396992, "peak_memory_bytes": { - "rss": 262864896, - "heap_used": 53884096, - "external": 9284140, - "array_buffers": 5493796 + "rss": 157790208, + "heap_used": 54303864, + "external": 8848749, + "array_buffers": 5052919 }, - "delta_rss_bytes": 5505024, + "delta_rss_bytes": 393216, "counters": { - "attachments.count_pending_direct": 26, - "attachments.insert_pending": 26, - "attachments.direct.initiated": 26, - "attachments.find_for_complete": 24, - "attachments.direct.verify_bytes": 3145728, - "attachments.decode.ms": 675.0934380001272, - "attachments.mark_ready": 24, - "attachments.direct.completed": 24 + "attachments.count_pending_direct": 23, + "attachments.insert_pending": 23, + "attachments.direct.initiated": 23, + "attachments.find_for_complete": 27, + "attachments.direct.verify_bytes": 3538944, + "attachments.decode.ms": 96.7698720000626, + "attachments.mark_ready": 27, + "attachments.direct.completed": 27 } } ], - "total_delta_rx_bytes": 6878542, - "total_delta_tx_bytes": 369520, - "rx_bytes_per_upload": 137571, - "tx_bytes_per_upload": 7390, - "max_delta_rss_bytes": 5505024 + "total_delta_rx_bytes": 6878622, + "total_delta_tx_bytes": 368656, + "rx_bytes_per_upload": 137572, + "tx_bytes_per_upload": 7373, + "max_delta_rss_bytes": 524288 }, { "uploads": 50, "succeeded": 50, "failed": 0, - "duration_s": 0.457, + "duration_s": 0.266, "latency_ms": { - "p50": 69.4, - "p95": 160.1, - "p99": 168.0 + "p50": 46.8, + "p95": 70.1, + "p99": 72.4 }, "replicas": [ { - "instance_id": "7c7cf67931e5", - "delta_rx_bytes": 3973401, - "delta_tx_bytes": 186806, - "baseline_rss_bytes": 224751616, + "instance_id": "90e2e1d73b23", + "delta_rx_bytes": 3839887, + "delta_tx_bytes": 184887, + "baseline_rss_bytes": 159240192, "peak_memory_bytes": { - "rss": 231305216, - "heap_used": 52952680, - "external": 7971474, - "array_buffers": 4181130 + "rss": 165924864, + "heap_used": 56746264, + "external": 9177437, + "array_buffers": 5381598 }, - "delta_rss_bytes": 6553600, + "delta_rss_bytes": 6684672, "counters": { - "attachments.count_pending_direct": 21, - "attachments.insert_pending": 21, - "attachments.direct.initiated": 21, - "attachments.find_for_complete": 29, - "attachments.direct.verify_bytes": 3801088, - "attachments.decode.ms": 828.3032130000065, - "attachments.mark_ready": 29, - "attachments.direct.completed": 29 + "attachments.count_pending_direct": 22, + "attachments.insert_pending": 22, + "attachments.direct.initiated": 22, + "attachments.find_for_complete": 28, + "attachments.direct.verify_bytes": 3670016, + "attachments.decode.ms": 115.71663299991633, + "attachments.mark_ready": 28, + "attachments.direct.completed": 28 } }, { - "instance_id": "ff9a363e52b1", - "delta_rx_bytes": 2904621, - "delta_tx_bytes": 180542, - "baseline_rss_bytes": 262864896, + "instance_id": "9bb9a19b4693", + "delta_rx_bytes": 3037580, + "delta_tx_bytes": 179535, + "baseline_rss_bytes": 157790208, "peak_memory_bytes": { - "rss": 262995968, - "heap_used": 53715664, - "external": 7518119, - "array_buffers": 3727743 + "rss": 159514624, + "heap_used": 55134936, + "external": 8340329, + "array_buffers": 4545339 }, - "delta_rss_bytes": 131072, + "delta_rss_bytes": 1724416, "counters": { - "attachments.count_pending_direct": 29, - "attachments.insert_pending": 29, - "attachments.direct.initiated": 29, - "attachments.find_for_complete": 21, - "attachments.direct.verify_bytes": 2752512, - "attachments.decode.ms": 312.0048850000021, - "attachments.mark_ready": 21, - "attachments.direct.completed": 21 + "attachments.count_pending_direct": 28, + "attachments.insert_pending": 28, + "attachments.direct.initiated": 28, + "attachments.find_for_complete": 22, + "attachments.direct.verify_bytes": 2883584, + "attachments.decode.ms": 78.47993500009761, + "attachments.mark_ready": 22, + "attachments.direct.completed": 22 } } ], - "total_delta_rx_bytes": 6878022, - "total_delta_tx_bytes": 367348, - "rx_bytes_per_upload": 137560, - "tx_bytes_per_upload": 7347, - "max_delta_rss_bytes": 6553600 + "total_delta_rx_bytes": 6877467, + "total_delta_tx_bytes": 364422, + "rx_bytes_per_upload": 137549, + "tx_bytes_per_upload": 7288, + "max_delta_rss_bytes": 6684672 } ] } diff --git a/evidence/lab4/bench/direct-9961472-c10.json b/evidence/lab4/bench/direct-9961472-c10.json index 1aa8c09..19ab486 100644 --- a/evidence/lab4/bench/direct-9961472-c10.json +++ b/evidence/lab4/bench/direct-9961472-c10.json @@ -1,213 +1,215 @@ { - "date": "2026-10-23T13:38:14+00:00", - "git": "4badd5a", + "date": "2026-10-23T14:14:37+00:00", + "git": "4b53e03", "params": { "mode": "direct", "size_bytes": 9961472, "concurrency": 10, "uploads_per_worker": 5, - "repeat": 3 + "repeat": 3, + "users": 10, + "image": null }, "host": { "nproc": 8, "mem_total_bytes": 16538955776 }, "api_container_limits_nanocpus_memory": [ - "1500000000 805306368", - "1500000000 805306368" + "1500000000 1073741824", + "1500000000 1073741824" ], "repeats": [ { "uploads": 50, "succeeded": 50, "failed": 0, - "duration_s": 4.981, + "duration_s": 3.609, "latency_ms": { - "p50": 754.7, - "p95": 975.5, - "p99": 1146.0 + "p50": 437.2, + "p95": 593.2, + "p99": 654.5 }, "replicas": [ { - "instance_id": "7c7cf67931e5", - "delta_rx_bytes": 289415606, - "delta_tx_bytes": 315409, - "baseline_rss_bytes": 233209856, + "instance_id": "90e2e1d73b23", + "delta_rx_bytes": 249509901, + "delta_tx_bytes": 287547, + "baseline_rss_bytes": 195174400, "peak_memory_bytes": { - "rss": 348733440, - "heap_used": 50095696, - "external": 115684307, - "array_buffers": 111893963 + "rss": 288415744, + "heap_used": 54409488, + "external": 117617657, + "array_buffers": 113825666 }, - "delta_rss_bytes": 115523584, + "delta_rss_bytes": 93241344, "counters": { - "attachments.count_pending_direct": 21, - "attachments.insert_pending": 21, - "attachments.direct.initiated": 21, - "attachments.find_for_complete": 29, - "attachments.direct.verify_bytes": 288882688, - "attachments.decode.ms": 7608.848039000004, - "attachments.mark_ready": 29, - "attachments.direct.completed": 29 + "attachments.count_pending_direct": 25, + "attachments.insert_pending": 25, + "attachments.direct.initiated": 25, + "attachments.find_for_complete": 25, + "attachments.direct.verify_bytes": 249036800, + "attachments.decode.ms": 315.7971269999689, + "attachments.mark_ready": 25, + "attachments.direct.completed": 25 } }, { - "instance_id": "ff9a363e52b1", - "delta_rx_bytes": 209597436, - "delta_tx_bytes": 298627, - "baseline_rss_bytes": 299487232, + "instance_id": "9bb9a19b4693", + "delta_rx_bytes": 249507617, + "delta_tx_bytes": 274665, + "baseline_rss_bytes": 214401024, "peak_memory_bytes": { - "rss": 330563584, - "heap_used": 51925192, - "external": 97861662, - "array_buffers": 94071318 + "rss": 289472512, + "heap_used": 51210776, + "external": 78987756, + "array_buffers": 75194088 }, - "delta_rss_bytes": 31076352, + "delta_rss_bytes": 75071488, "counters": { - "attachments.count_pending_direct": 29, - "attachments.insert_pending": 29, - "attachments.direct.initiated": 29, - "attachments.find_for_complete": 21, - "attachments.direct.verify_bytes": 209190912, - "attachments.decode.ms": 5015.750637000019, - "attachments.mark_ready": 21, - "attachments.direct.completed": 21 + "attachments.count_pending_direct": 25, + "attachments.insert_pending": 25, + "attachments.direct.initiated": 25, + "attachments.find_for_complete": 25, + "attachments.direct.verify_bytes": 249036800, + "attachments.decode.ms": 276.87352200000896, + "attachments.mark_ready": 25, + "attachments.direct.completed": 25 } } ], - "total_delta_rx_bytes": 499013042, - "total_delta_tx_bytes": 614036, - "rx_bytes_per_upload": 9980261, - "tx_bytes_per_upload": 12281, - "max_delta_rss_bytes": 115523584 + "total_delta_rx_bytes": 499017518, + "total_delta_tx_bytes": 562212, + "rx_bytes_per_upload": 9980350, + "tx_bytes_per_upload": 11244, + "max_delta_rss_bytes": 93241344 }, { "uploads": 50, "succeeded": 50, "failed": 0, - "duration_s": 5.254, + "duration_s": 3.4, "latency_ms": { - "p50": 900.1, - "p95": 1222.8, - "p99": 1235.6 + "p50": 424.6, + "p95": 661.8, + "p99": 810.6 }, "replicas": [ { - "instance_id": "7c7cf67931e5", - "delta_rx_bytes": 309427096, - "delta_tx_bytes": 332725, - "baseline_rss_bytes": 282836992, + "instance_id": "90e2e1d73b23", + "delta_rx_bytes": 239528101, + "delta_tx_bytes": 272852, + "baseline_rss_bytes": 205328384, "peak_memory_bytes": { - "rss": 370515968, - "heap_used": 52368944, - "external": 134179853, - "array_buffers": 130389509 + "rss": 300617728, + "heap_used": 50698680, + "external": 103322639, + "array_buffers": 99528980 }, - "delta_rss_bytes": 87678976, + "delta_rss_bytes": 95289344, "counters": { - "attachments.count_pending_direct": 19, - "attachments.insert_pending": 19, - "attachments.direct.initiated": 19, - "attachments.find_for_complete": 31, - "attachments.direct.verify_bytes": 308805632, - "attachments.decode.ms": 8379.456620000012, - "attachments.mark_ready": 31, - "attachments.direct.completed": 31 + "attachments.count_pending_direct": 26, + "attachments.insert_pending": 26, + "attachments.direct.initiated": 26, + "attachments.find_for_complete": 24, + "attachments.direct.verify_bytes": 239075328, + "attachments.decode.ms": 398.21300999989035, + "attachments.mark_ready": 24, + "attachments.direct.completed": 24 } }, { - "instance_id": "ff9a363e52b1", - "delta_rx_bytes": 189647218, - "delta_tx_bytes": 291721, - "baseline_rss_bytes": 286593024, + "instance_id": "9bb9a19b4693", + "delta_rx_bytes": 259470789, + "delta_tx_bytes": 262770, + "baseline_rss_bytes": 246329344, "peak_memory_bytes": { - "rss": 338497536, - "heap_used": 53161904, - "external": 107895361, - "array_buffers": 104105017 + "rss": 286126080, + "heap_used": 50197744, + "external": 84091903, + "array_buffers": 80294845 }, - "delta_rss_bytes": 51904512, + "delta_rss_bytes": 39796736, "counters": { - "attachments.count_pending_direct": 31, - "attachments.insert_pending": 31, - "attachments.direct.initiated": 31, - "attachments.find_for_complete": 19, - "attachments.direct.verify_bytes": 189267968, - "attachments.decode.ms": 3974.233845000039, - "attachments.mark_ready": 19, - "attachments.direct.completed": 19 + "attachments.count_pending_direct": 24, + "attachments.insert_pending": 24, + "attachments.direct.initiated": 24, + "attachments.find_for_complete": 26, + "attachments.direct.verify_bytes": 258998272, + "attachments.decode.ms": 379.7956310000154, + "attachments.mark_ready": 26, + "attachments.direct.completed": 26 } } ], - "total_delta_rx_bytes": 499074314, - "total_delta_tx_bytes": 624446, - "rx_bytes_per_upload": 9981486, - "tx_bytes_per_upload": 12489, - "max_delta_rss_bytes": 87678976 + "total_delta_rx_bytes": 498998890, + "total_delta_tx_bytes": 535622, + "rx_bytes_per_upload": 9979978, + "tx_bytes_per_upload": 10712, + "max_delta_rss_bytes": 95289344 }, { "uploads": 50, "succeeded": 50, "failed": 0, - "duration_s": 4.652, + "duration_s": 3.356, "latency_ms": { - "p50": 692.0, - "p95": 1018.5, - "p99": 1133.8 + "p50": 420.6, + "p95": 614.8, + "p99": 658.8 }, "replicas": [ { - "instance_id": "7c7cf67931e5", - "delta_rx_bytes": 269445871, - "delta_tx_bytes": 269717, - "baseline_rss_bytes": 340176896, + "instance_id": "90e2e1d73b23", + "delta_rx_bytes": 279414785, + "delta_tx_bytes": 268777, + "baseline_rss_bytes": 247771136, "peak_memory_bytes": { - "rss": 342388736, - "heap_used": 50625080, - "external": 119380564, - "array_buffers": 100369674 + "rss": 275718144, + "heap_used": 51721152, + "external": 97550522, + "array_buffers": 92510562 }, - "delta_rss_bytes": 2211840, + "delta_rss_bytes": 27947008, "counters": { - "attachments.count_pending_direct": 23, - "attachments.insert_pending": 23, - "attachments.direct.initiated": 23, - "attachments.find_for_complete": 27, - "attachments.direct.verify_bytes": 268959744, - "attachments.decode.ms": 7779.908828999905, - "attachments.mark_ready": 27, - "attachments.direct.completed": 27 + "attachments.count_pending_direct": 22, + "attachments.insert_pending": 22, + "attachments.direct.initiated": 22, + "attachments.find_for_complete": 28, + "attachments.direct.verify_bytes": 278921216, + "attachments.decode.ms": 460.6956299999729, + "attachments.mark_ready": 28, + "attachments.direct.completed": 28 } }, { - "instance_id": "ff9a363e52b1", - "delta_rx_bytes": 229550093, - "delta_tx_bytes": 268720, - "baseline_rss_bytes": 308649984, + "instance_id": "9bb9a19b4693", + "delta_rx_bytes": 219572364, + "delta_tx_bytes": 248203, + "baseline_rss_bytes": 246599680, "peak_memory_bytes": { - "rss": 354787328, - "heap_used": 52204288, - "external": 121315649, - "array_buffers": 100267973 + "rss": 280461312, + "heap_used": 51774984, + "external": 90380520, + "array_buffers": 86585199 }, - "delta_rss_bytes": 46137344, + "delta_rss_bytes": 33861632, "counters": { - "attachments.count_pending_direct": 27, - "attachments.insert_pending": 27, - "attachments.direct.initiated": 27, - "attachments.find_for_complete": 23, - "attachments.direct.verify_bytes": 229113856, - "attachments.decode.ms": 6111.090034999943, - "attachments.mark_ready": 23, - "attachments.direct.completed": 23 + "attachments.count_pending_direct": 28, + "attachments.insert_pending": 28, + "attachments.direct.initiated": 28, + "attachments.find_for_complete": 22, + "attachments.direct.verify_bytes": 219152384, + "attachments.decode.ms": 303.119670999964, + "attachments.mark_ready": 22, + "attachments.direct.completed": 22 } } ], - "total_delta_rx_bytes": 498995964, - "total_delta_tx_bytes": 538437, - "rx_bytes_per_upload": 9979919, - "tx_bytes_per_upload": 10769, - "max_delta_rss_bytes": 46137344 + "total_delta_rx_bytes": 498987149, + "total_delta_tx_bytes": 516980, + "rx_bytes_per_upload": 9979743, + "tx_bytes_per_upload": 10340, + "max_delta_rss_bytes": 33861632 } ] } diff --git a/evidence/lab4/bench/direct-worst-c32.json b/evidence/lab4/bench/direct-worst-c32.json new file mode 100644 index 0000000..59f53a1 --- /dev/null +++ b/evidence/lab4/bench/direct-worst-c32.json @@ -0,0 +1,217 @@ +{ + "date": "2026-10-23T14:17:56+00:00", + "git": "4b53e03", + "params": { + "mode": "direct", + "size_bytes": 10485760, + "concurrency": 32, + "uploads_per_worker": 2, + "repeat": 3, + "users": 32, + "image": "tmp.n0I8NPEIWj.png" + }, + "host": { + "nproc": 8, + "mem_total_bytes": 16538955776 + }, + "api_container_limits_nanocpus_memory": [ + "1500000000 1073741824", + "1500000000 1073741824" + ], + "repeats": [ + { + "uploads": 64, + "succeeded": 48, + "failed": 16, + "duration_s": 25.799, + "latency_ms": { + "p50": 10903.2, + "p95": 13413.2, + "p99": 14173.1 + }, + "replicas": [ + { + "instance_id": "90e2e1d73b23", + "delta_rx_bytes": 168207096, + "delta_tx_bytes": 377593, + "baseline_rss_bytes": 413126656, + "peak_memory_bytes": { + "rss": 811970560, + "heap_used": 51684264, + "external": 224794743, + "array_buffers": 221004399 + }, + "delta_rss_bytes": 398843904, + "counters": { + "attachments.count_pending_direct": 48, + "attachments.insert_pending": 48, + "attachments.direct.initiated": 48, + "attachments.find_for_complete": 16, + "attachments.direct.verify_bytes": 167772160, + "attachments.decode.ms": 12822.89115199988, + "attachments.mark_ready": 16, + "attachments.direct.completed": 16 + } + }, + { + "instance_id": "9bb9a19b4693", + "delta_rx_bytes": 336356397, + "delta_tx_bytes": 437597, + "baseline_rss_bytes": 273133568, + "peak_memory_bytes": { + "rss": 811171840, + "heap_used": 50554752, + "external": 236627771, + "array_buffers": 232837243 + }, + "delta_rss_bytes": 538038272, + "counters": { + "attachments.count_pending_direct": 16, + "attachments.insert_pending": 16, + "attachments.direct.initiated": 16, + "attachments.find_for_complete": 48, + "attachments.direct.verify_bytes": 335544320, + "attachments.decode.ms": 24913.963424000074, + "attachments.mark_ready": 32, + "attachments.direct.completed": 32 + } + } + ], + "total_delta_rx_bytes": 504563493, + "total_delta_tx_bytes": 815190, + "rx_bytes_per_upload": 7883805, + "tx_bytes_per_upload": 12737, + "max_delta_rss_bytes": 538038272 + }, + { + "uploads": 64, + "succeeded": 48, + "failed": 16, + "duration_s": 25.734, + "latency_ms": { + "p50": 11194.6, + "p95": 13476.1, + "p99": 14262.3 + }, + "replicas": [ + { + "instance_id": "90e2e1d73b23", + "delta_rx_bytes": 168183438, + "delta_tx_bytes": 346932, + "baseline_rss_bytes": 458866688, + "peak_memory_bytes": { + "rss": 790888448, + "heap_used": 51757664, + "external": 233673177, + "array_buffers": 229882833 + }, + "delta_rss_bytes": 332021760, + "counters": { + "attachments.count_pending_direct": 48, + "attachments.insert_pending": 48, + "attachments.direct.initiated": 48, + "attachments.find_for_complete": 16, + "attachments.direct.verify_bytes": 167772160, + "attachments.decode.ms": 12989.242685000005, + "attachments.mark_ready": 16, + "attachments.direct.completed": 16, + "attachments.claim_expired": 1 + } + }, + { + "instance_id": "9bb9a19b4693", + "delta_rx_bytes": 336214769, + "delta_tx_bytes": 436112, + "baseline_rss_bytes": 457699328, + "peak_memory_bytes": { + "rss": 825307136, + "heap_used": 54086928, + "external": 219073224, + "array_buffers": 208987973 + }, + "delta_rss_bytes": 367607808, + "counters": { + "attachments.count_pending_direct": 16, + "attachments.insert_pending": 16, + "attachments.direct.initiated": 16, + "attachments.find_for_complete": 48, + "attachments.direct.verify_bytes": 335544320, + "attachments.decode.ms": 24466.148074000026, + "attachments.mark_ready": 32, + "attachments.direct.completed": 32, + "attachments.claim_expired": 1 + } + } + ], + "total_delta_rx_bytes": 504398207, + "total_delta_tx_bytes": 783044, + "rx_bytes_per_upload": 7881222, + "tx_bytes_per_upload": 12235, + "max_delta_rss_bytes": 367607808 + }, + { + "uploads": 64, + "succeeded": 48, + "failed": 16, + "duration_s": 25.623, + "latency_ms": { + "p50": 10789.6, + "p95": 13221.5, + "p99": 14052.1 + }, + "replicas": [ + { + "instance_id": "90e2e1d73b23", + "delta_rx_bytes": 168209005, + "delta_tx_bytes": 348167, + "baseline_rss_bytes": 437620736, + "peak_memory_bytes": { + "rss": 822276096, + "heap_used": 51899912, + "external": 234753853, + "array_buffers": 230961509 + }, + "delta_rss_bytes": 384655360, + "counters": { + "attachments.count_pending_direct": 48, + "attachments.insert_pending": 48, + "attachments.direct.initiated": 48, + "attachments.find_for_complete": 16, + "attachments.direct.verify_bytes": 167772160, + "attachments.decode.ms": 12794.351691999997, + "attachments.mark_ready": 16, + "attachments.direct.completed": 16 + } + }, + { + "instance_id": "9bb9a19b4693", + "delta_rx_bytes": 336206395, + "delta_tx_bytes": 391291, + "baseline_rss_bytes": 472084480, + "peak_memory_bytes": { + "rss": 803594240, + "heap_used": 54432464, + "external": 237968850, + "array_buffers": 234178395 + }, + "delta_rss_bytes": 331509760, + "counters": { + "attachments.count_pending_direct": 16, + "attachments.insert_pending": 16, + "attachments.direct.initiated": 16, + "attachments.find_for_complete": 48, + "attachments.direct.verify_bytes": 335544320, + "attachments.decode.ms": 24526.03154399991, + "attachments.mark_ready": 32, + "attachments.direct.completed": 32 + } + } + ], + "total_delta_rx_bytes": 504415400, + "total_delta_tx_bytes": 739458, + "rx_bytes_per_upload": 7881491, + "tx_bytes_per_upload": 11554, + "max_delta_rss_bytes": 384655360 + } + ] +} diff --git a/evidence/lab4/bench/proxy-1048576-c10.json b/evidence/lab4/bench/proxy-1048576-c10.json index 837c66c..7f312bf 100644 --- a/evidence/lab4/bench/proxy-1048576-c10.json +++ b/evidence/lab4/bench/proxy-1048576-c10.json @@ -1,201 +1,203 @@ { - "date": "2026-10-23T13:37:29+00:00", - "git": "4badd5a", + "date": "2026-10-23T14:14:01+00:00", + "git": "4b53e03", "params": { "mode": "proxy", "size_bytes": 1048576, "concurrency": 10, "uploads_per_worker": 5, - "repeat": 3 + "repeat": 3, + "users": 10, + "image": null }, "host": { "nproc": 8, "mem_total_bytes": 16538955776 }, "api_container_limits_nanocpus_memory": [ - "1500000000 805306368", - "1500000000 805306368" + "1500000000 1073741824", + "1500000000 1073741824" ], "repeats": [ { "uploads": 50, "succeeded": 50, "failed": 0, - "duration_s": 0.885, + "duration_s": 0.392, "latency_ms": { - "p50": 156.2, - "p95": 207.1, - "p99": 235.1 + "p50": 56.0, + "p95": 100.2, + "p99": 108.3 }, "replicas": [ { - "instance_id": "7c7cf67931e5", - "delta_rx_bytes": 26389500, - "delta_tx_bytes": 26402061, - "baseline_rss_bytes": 231522304, + "instance_id": "90e2e1d73b23", + "delta_rx_bytes": 26387282, + "delta_tx_bytes": 26396329, + "baseline_rss_bytes": 167575552, "peak_memory_bytes": { - "rss": 231522304, - "heap_used": 52773312, - "external": 23343330, - "array_buffers": 19552986 + "rss": 180232192, + "heap_used": 54305016, + "external": 22415054, + "array_buffers": 18606583 }, - "delta_rss_bytes": 0, + "delta_rss_bytes": 12656640, "counters": { "attachments.insert_pending": 25, "attachments.proxy.bytes_in": 26214400, - "attachments.decode.ms": 1601.4592339998344, + "attachments.decode.ms": 161.38972300002933, "attachments.proxy.bytes_to_s3": 26214400, "attachments.mark_ready": 25, "attachments.upload.created": 25 } }, { - "instance_id": "ff9a363e52b1", - "delta_rx_bytes": 26384219, - "delta_tx_bytes": 26403431, - "baseline_rss_bytes": 264105984, + "instance_id": "9bb9a19b4693", + "delta_rx_bytes": 26380621, + "delta_tx_bytes": 26397967, + "baseline_rss_bytes": 164233216, "peak_memory_bytes": { - "rss": 266989568, - "heap_used": 49942048, - "external": 24835619, - "array_buffers": 18813186 + "rss": 182816768, + "heap_used": 55081640, + "external": 25150489, + "array_buffers": 21337451 }, - "delta_rss_bytes": 2883584, + "delta_rss_bytes": 18583552, "counters": { "attachments.insert_pending": 25, "attachments.proxy.bytes_in": 26214400, - "attachments.decode.ms": 1562.9852019998943, + "attachments.decode.ms": 153.55793299997458, "attachments.proxy.bytes_to_s3": 26214400, "attachments.mark_ready": 25, "attachments.upload.created": 25 } } ], - "total_delta_rx_bytes": 52773719, - "total_delta_tx_bytes": 52805492, - "rx_bytes_per_upload": 1055474, - "tx_bytes_per_upload": 1056110, - "max_delta_rss_bytes": 2883584 + "total_delta_rx_bytes": 52767903, + "total_delta_tx_bytes": 52794296, + "rx_bytes_per_upload": 1055358, + "tx_bytes_per_upload": 1055886, + "max_delta_rss_bytes": 18583552 }, { "uploads": 50, "succeeded": 50, "failed": 0, - "duration_s": 0.771, + "duration_s": 0.44, "latency_ms": { - "p50": 131.9, - "p95": 174.7, - "p99": 175.6 + "p50": 57.0, + "p95": 123.6, + "p99": 164.4 }, "replicas": [ { - "instance_id": "7c7cf67931e5", - "delta_rx_bytes": 26384709, - "delta_tx_bytes": 26401945, - "baseline_rss_bytes": 231522304, + "instance_id": "90e2e1d73b23", + "delta_rx_bytes": 26400102, + "delta_tx_bytes": 26408679, + "baseline_rss_bytes": 180232192, "peak_memory_bytes": { - "rss": 233619456, - "heap_used": 51880616, - "external": 32630526, - "array_buffers": 26533593 + "rss": 186654720, + "heap_used": 52146632, + "external": 28489237, + "array_buffers": 24678454 }, - "delta_rss_bytes": 2097152, + "delta_rss_bytes": 6422528, "counters": { "attachments.insert_pending": 25, "attachments.proxy.bytes_in": 26214400, - "attachments.decode.ms": 1264.4056559997844, + "attachments.decode.ms": 200.20289300006698, "attachments.proxy.bytes_to_s3": 26214400, "attachments.mark_ready": 25, "attachments.upload.created": 25 } }, { - "instance_id": "ff9a363e52b1", - "delta_rx_bytes": 26376275, - "delta_tx_bytes": 26401865, - "baseline_rss_bytes": 266989568, + "instance_id": "9bb9a19b4693", + "delta_rx_bytes": 26378813, + "delta_tx_bytes": 26400238, + "baseline_rss_bytes": 182816768, "peak_memory_bytes": { - "rss": 266989568, - "heap_used": 50529400, - "external": 26599488, - "array_buffers": 22809144 + "rss": 191991808, + "heap_used": 53527584, + "external": 35009900, + "array_buffers": 31190059 }, - "delta_rss_bytes": 0, + "delta_rss_bytes": 9175040, "counters": { "attachments.insert_pending": 25, "attachments.proxy.bytes_in": 26214400, - "attachments.decode.ms": 1410.3865230001393, + "attachments.decode.ms": 137.82972499995958, "attachments.proxy.bytes_to_s3": 26214400, "attachments.mark_ready": 25, "attachments.upload.created": 25 } } ], - "total_delta_rx_bytes": 52760984, - "total_delta_tx_bytes": 52803810, - "rx_bytes_per_upload": 1055220, - "tx_bytes_per_upload": 1056076, - "max_delta_rss_bytes": 2097152 + "total_delta_rx_bytes": 52778915, + "total_delta_tx_bytes": 52808917, + "rx_bytes_per_upload": 1055578, + "tx_bytes_per_upload": 1056178, + "max_delta_rss_bytes": 9175040 }, { "uploads": 50, "succeeded": 50, "failed": 0, - "duration_s": 0.792, + "duration_s": 0.37, "latency_ms": { - "p50": 126.4, - "p95": 182.7, - "p99": 191.3 + "p50": 46.4, + "p95": 81.6, + "p99": 99.1 }, "replicas": [ { - "instance_id": "7c7cf67931e5", - "delta_rx_bytes": 26385221, - "delta_tx_bytes": 26404709, - "baseline_rss_bytes": 233619456, + "instance_id": "90e2e1d73b23", + "delta_rx_bytes": 26383217, + "delta_tx_bytes": 26399979, + "baseline_rss_bytes": 181960704, "peak_memory_bytes": { - "rss": 233619456, - "heap_used": 51420296, - "external": 29512306, - "array_buffers": 25721962 + "rss": 188776448, + "heap_used": 52208392, + "external": 28664130, + "array_buffers": 24846506 }, - "delta_rss_bytes": 0, + "delta_rss_bytes": 6815744, "counters": { "attachments.insert_pending": 25, "attachments.proxy.bytes_in": 26214400, - "attachments.decode.ms": 1199.6556880001444, + "attachments.decode.ms": 139.54196999999112, "attachments.proxy.bytes_to_s3": 26214400, "attachments.mark_ready": 25, "attachments.upload.created": 25 } }, { - "instance_id": "ff9a363e52b1", - "delta_rx_bytes": 26378117, - "delta_tx_bytes": 26400049, - "baseline_rss_bytes": 266989568, + "instance_id": "9bb9a19b4693", + "delta_rx_bytes": 26394762, + "delta_tx_bytes": 26403375, + "baseline_rss_bytes": 179302400, "peak_memory_bytes": { - "rss": 267907072, - "heap_used": 51921864, - "external": 30362031, - "array_buffers": 26571687 + "rss": 184086528, + "heap_used": 50413992, + "external": 24938566, + "array_buffers": 21130086 }, - "delta_rss_bytes": 917504, + "delta_rss_bytes": 4784128, "counters": { "attachments.insert_pending": 25, "attachments.proxy.bytes_in": 26214400, - "attachments.decode.ms": 1393.8144420000026, + "attachments.decode.ms": 202.13070199999493, "attachments.proxy.bytes_to_s3": 26214400, "attachments.mark_ready": 25, "attachments.upload.created": 25 } } ], - "total_delta_rx_bytes": 52763338, - "total_delta_tx_bytes": 52804758, - "rx_bytes_per_upload": 1055267, - "tx_bytes_per_upload": 1056095, - "max_delta_rss_bytes": 917504 + "total_delta_rx_bytes": 52777979, + "total_delta_tx_bytes": 52803354, + "rx_bytes_per_upload": 1055560, + "tx_bytes_per_upload": 1056067, + "max_delta_rss_bytes": 6815744 } ] } diff --git a/evidence/lab4/bench/proxy-131072-c10.json b/evidence/lab4/bench/proxy-131072-c10.json index 7cabee1..e8d40df 100644 --- a/evidence/lab4/bench/proxy-131072-c10.json +++ b/evidence/lab4/bench/proxy-131072-c10.json @@ -1,201 +1,203 @@ { - "date": "2026-10-23T13:37:18+00:00", - "git": "4badd5a", + "date": "2026-10-23T14:13:50+00:00", + "git": "4b53e03", "params": { "mode": "proxy", "size_bytes": 131072, "concurrency": 10, "uploads_per_worker": 5, - "repeat": 3 + "repeat": 3, + "users": 10, + "image": null }, "host": { "nproc": 8, "mem_total_bytes": 16538955776 }, "api_container_limits_nanocpus_memory": [ - "1500000000 805306368", - "1500000000 805306368" + "1500000000 1073741824", + "1500000000 1073741824" ], "repeats": [ { "uploads": 50, "succeeded": 50, "failed": 0, - "duration_s": 0.331, + "duration_s": 0.166, "latency_ms": { - "p50": 57.2, - "p95": 80.6, - "p99": 88.9 + "p50": 26.0, + "p95": 43.4, + "p99": 53.2 }, "replicas": [ { - "instance_id": "7c7cf67931e5", - "delta_rx_bytes": 3385418, - "delta_tx_bytes": 3400077, - "baseline_rss_bytes": 218017792, + "instance_id": "90e2e1d73b23", + "delta_rx_bytes": 3383029, + "delta_tx_bytes": 3398057, + "baseline_rss_bytes": 140619776, "peak_memory_bytes": { - "rss": 220377088, - "heap_used": 50283096, - "external": 8478293, - "array_buffers": 4687725 + "rss": 149794816, + "heap_used": 51367680, + "external": 8055768, + "array_buffers": 4261819 }, - "delta_rss_bytes": 2359296, + "delta_rss_bytes": 9175040, "counters": { "attachments.insert_pending": 25, "attachments.proxy.bytes_in": 3276800, - "attachments.decode.ms": 575.8783200000762, + "attachments.decode.ms": 83.07460599998012, "attachments.proxy.bytes_to_s3": 3276800, "attachments.mark_ready": 25, "attachments.upload.created": 25 } }, { - "instance_id": "ff9a363e52b1", - "delta_rx_bytes": 3385072, - "delta_tx_bytes": 3399873, - "baseline_rss_bytes": 249233408, + "instance_id": "9bb9a19b4693", + "delta_rx_bytes": 3381990, + "delta_tx_bytes": 3399067, + "baseline_rss_bytes": 139079680, "peak_memory_bytes": { - "rss": 252379136, - "heap_used": 50306832, - "external": 9099311, - "array_buffers": 5308711 + "rss": 148328448, + "heap_used": 51262864, + "external": 7893259, + "array_buffers": 4099697 }, - "delta_rss_bytes": 3145728, + "delta_rss_bytes": 9248768, "counters": { "attachments.insert_pending": 25, "attachments.proxy.bytes_in": 3276800, - "attachments.decode.ms": 590.1611679997877, + "attachments.decode.ms": 89.15959899991867, "attachments.proxy.bytes_to_s3": 3276800, "attachments.mark_ready": 25, "attachments.upload.created": 25 } } ], - "total_delta_rx_bytes": 6770490, - "total_delta_tx_bytes": 6799950, - "rx_bytes_per_upload": 135410, - "tx_bytes_per_upload": 135999, - "max_delta_rss_bytes": 3145728 + "total_delta_rx_bytes": 6765019, + "total_delta_tx_bytes": 6797124, + "rx_bytes_per_upload": 135300, + "tx_bytes_per_upload": 135942, + "max_delta_rss_bytes": 9248768 }, { "uploads": 50, "succeeded": 50, "failed": 0, - "duration_s": 0.316, + "duration_s": 0.173, "latency_ms": { - "p50": 55.2, - "p95": 87.2, - "p99": 99.2 + "p50": 27.7, + "p95": 49.1, + "p99": 49.5 }, "replicas": [ { - "instance_id": "7c7cf67931e5", - "delta_rx_bytes": 3376247, - "delta_tx_bytes": 3395251, - "baseline_rss_bytes": 220508160, + "instance_id": "90e2e1d73b23", + "delta_rx_bytes": 3377379, + "delta_tx_bytes": 3394793, + "baseline_rss_bytes": 149794816, "peak_memory_bytes": { - "rss": 223653888, - "heap_used": 50422968, - "external": 8537602, - "array_buffers": 4747258 - }, - "delta_rss_bytes": 3145728, - "counters": { - "attachments.insert_pending": 25, - "attachments.proxy.bytes_in": 3276800, - "attachments.decode.ms": 568.8078680001199, - "attachments.proxy.bytes_to_s3": 3276800, - "attachments.mark_ready": 25, - "attachments.upload.created": 25 - } - }, - { - "instance_id": "ff9a363e52b1", - "delta_rx_bytes": 3378432, - "delta_tx_bytes": 3395587, - "baseline_rss_bytes": 252379136, - "peak_memory_bytes": { - "rss": 255524864, - "heap_used": 49969448, - "external": 10496847, - "array_buffers": 6706503 - }, - "delta_rss_bytes": 3145728, - "counters": { - "attachments.insert_pending": 25, - "attachments.proxy.bytes_in": 3276800, - "attachments.decode.ms": 575.633941000211, - "attachments.proxy.bytes_to_s3": 3276800, - "attachments.mark_ready": 25, - "attachments.upload.created": 25 - } - } - ], - "total_delta_rx_bytes": 6754679, - "total_delta_tx_bytes": 6790838, - "rx_bytes_per_upload": 135094, - "tx_bytes_per_upload": 135817, - "max_delta_rss_bytes": 3145728 - }, - { - "uploads": 50, - "succeeded": 50, - "failed": 0, - "duration_s": 0.364, - "latency_ms": { - "p50": 61.0, - "p95": 100.6, - "p99": 109.1 - }, - "replicas": [ - { - "instance_id": "7c7cf67931e5", - "delta_rx_bytes": 3377231, - "delta_tx_bytes": 3396261, - "baseline_rss_bytes": 223653888, - "peak_memory_bytes": { - "rss": 224178176, - "heap_used": 50203952, - "external": 12043208, - "array_buffers": 8243836 - }, - "delta_rss_bytes": 524288, - "counters": { - "attachments.insert_pending": 25, - "attachments.proxy.bytes_in": 3276800, - "attachments.decode.ms": 554.1256450000219, - "attachments.proxy.bytes_to_s3": 3276800, - "attachments.mark_ready": 25, - "attachments.upload.created": 25 - } - }, - { - "instance_id": "ff9a363e52b1", - "delta_rx_bytes": 3376327, - "delta_tx_bytes": 3397971, - "baseline_rss_bytes": 255524864, - "peak_memory_bytes": { - "rss": 255655936, - "heap_used": 50414024, - "external": 11828788, - "array_buffers": 8038444 + "rss": 149925888, + "heap_used": 50693344, + "external": 7902800, + "array_buffers": 4109077 }, "delta_rss_bytes": 131072, "counters": { "attachments.insert_pending": 25, "attachments.proxy.bytes_in": 3276800, - "attachments.decode.ms": 655.3769140000804, + "attachments.decode.ms": 85.17745499999728, + "attachments.proxy.bytes_to_s3": 3276800, + "attachments.mark_ready": 25, + "attachments.upload.created": 25 + } + }, + { + "instance_id": "9bb9a19b4693", + "delta_rx_bytes": 3377406, + "delta_tx_bytes": 3395327, + "baseline_rss_bytes": 148328448, + "peak_memory_bytes": { + "rss": 149770240, + "heap_used": 51549096, + "external": 8924915, + "array_buffers": 4317559 + }, + "delta_rss_bytes": 1441792, + "counters": { + "attachments.insert_pending": 25, + "attachments.proxy.bytes_in": 3276800, + "attachments.decode.ms": 96.18780900008278, "attachments.proxy.bytes_to_s3": 3276800, "attachments.mark_ready": 25, "attachments.upload.created": 25 } } ], - "total_delta_rx_bytes": 6753558, - "total_delta_tx_bytes": 6794232, - "rx_bytes_per_upload": 135071, - "tx_bytes_per_upload": 135885, - "max_delta_rss_bytes": 524288 + "total_delta_rx_bytes": 6754785, + "total_delta_tx_bytes": 6790120, + "rx_bytes_per_upload": 135096, + "tx_bytes_per_upload": 135802, + "max_delta_rss_bytes": 1441792 + }, + { + "uploads": 50, + "succeeded": 50, + "failed": 0, + "duration_s": 0.206, + "latency_ms": { + "p50": 33.9, + "p95": 57.9, + "p99": 66.3 + }, + "replicas": [ + { + "instance_id": "90e2e1d73b23", + "delta_rx_bytes": 3376104, + "delta_tx_bytes": 3395515, + "baseline_rss_bytes": 149925888, + "peak_memory_bytes": { + "rss": 156610560, + "heap_used": 52936520, + "external": 10702533, + "array_buffers": 6907528 + }, + "delta_rss_bytes": 6684672, + "counters": { + "attachments.insert_pending": 25, + "attachments.proxy.bytes_in": 3276800, + "attachments.decode.ms": 92.25257400004193, + "attachments.proxy.bytes_to_s3": 3276800, + "attachments.mark_ready": 25, + "attachments.upload.created": 25 + } + }, + { + "instance_id": "9bb9a19b4693", + "delta_rx_bytes": 3375521, + "delta_tx_bytes": 3395653, + "baseline_rss_bytes": 149770240, + "peak_memory_bytes": { + "rss": 155930624, + "heap_used": 52559728, + "external": 11541159, + "array_buffers": 7744900 + }, + "delta_rss_bytes": 6160384, + "counters": { + "attachments.insert_pending": 25, + "attachments.proxy.bytes_in": 3276800, + "attachments.decode.ms": 134.16439100005664, + "attachments.proxy.bytes_to_s3": 3276800, + "attachments.mark_ready": 25, + "attachments.upload.created": 25 + } + } + ], + "total_delta_rx_bytes": 6751625, + "total_delta_tx_bytes": 6791168, + "rx_bytes_per_upload": 135032, + "tx_bytes_per_upload": 135823, + "max_delta_rss_bytes": 6684672 } ] } diff --git a/evidence/lab4/bench/proxy-9961472-c10.json b/evidence/lab4/bench/proxy-9961472-c10.json index da8a146..7187173 100644 --- a/evidence/lab4/bench/proxy-9961472-c10.json +++ b/evidence/lab4/bench/proxy-9961472-c10.json @@ -1,201 +1,205 @@ { - "date": "2026-10-23T13:37:55+00:00", - "git": "4badd5a", + "date": "2026-10-23T14:14:21+00:00", + "git": "4b53e03", "params": { "mode": "proxy", "size_bytes": 9961472, "concurrency": 10, "uploads_per_worker": 5, - "repeat": 3 + "repeat": 3, + "users": 10, + "image": null }, "host": { "nproc": 8, "mem_total_bytes": 16538955776 }, "api_container_limits_nanocpus_memory": [ - "1500000000 805306368", - "1500000000 805306368" + "1500000000 1073741824", + "1500000000 1073741824" ], "repeats": [ { "uploads": 50, "succeeded": 50, "failed": 0, - "duration_s": 4.75, + "duration_s": 2.855, "latency_ms": { - "p50": 586.5, - "p95": 851.2, - "p99": 924.0 + "p50": 254.6, + "p95": 441.6, + "p99": 469.3 }, "replicas": [ { - "instance_id": "7c7cf67931e5", - "delta_rx_bytes": 249636366, - "delta_tx_bytes": 249800729, - "baseline_rss_bytes": 242110464, + "instance_id": "90e2e1d73b23", + "delta_rx_bytes": 249684122, + "delta_tx_bytes": 249819648, + "baseline_rss_bytes": 194351104, "peak_memory_bytes": { - "rss": 302125056, - "heap_used": 50330056, - "external": 79829666, - "array_buffers": 76039322 + "rss": 243703808, + "heap_used": 49360872, + "external": 68770063, + "array_buffers": 64974750 }, - "delta_rss_bytes": 60014592, + "delta_rss_bytes": 49352704, "counters": { "attachments.insert_pending": 25, "attachments.proxy.bytes_in": 249036800, - "attachments.decode.ms": 7776.616332000063, + "attachments.decode.ms": 317.76610400003847, "attachments.proxy.bytes_to_s3": 249036800, "attachments.mark_ready": 25, "attachments.upload.created": 25 } }, { - "instance_id": "ff9a363e52b1", - "delta_rx_bytes": 249671660, - "delta_tx_bytes": 249815904, - "baseline_rss_bytes": 279318528, + "instance_id": "9bb9a19b4693", + "delta_rx_bytes": 249687515, + "delta_tx_bytes": 249813144, + "baseline_rss_bytes": 212090880, "peak_memory_bytes": { - "rss": 335978496, - "heap_used": 50779240, - "external": 99370165, - "array_buffers": 91157282 + "rss": 245616640, + "heap_used": 49395480, + "external": 62511358, + "array_buffers": 58716046 }, - "delta_rss_bytes": 56659968, + "delta_rss_bytes": 33525760, "counters": { "attachments.insert_pending": 25, "attachments.proxy.bytes_in": 249036800, - "attachments.decode.ms": 7460.193873999873, + "attachments.decode.ms": 328.639833000052, "attachments.proxy.bytes_to_s3": 249036800, "attachments.mark_ready": 25, "attachments.upload.created": 25 } } ], - "total_delta_rx_bytes": 499308026, - "total_delta_tx_bytes": 499616633, - "rx_bytes_per_upload": 9986161, - "tx_bytes_per_upload": 9992333, - "max_delta_rss_bytes": 60014592 + "total_delta_rx_bytes": 499371637, + "total_delta_tx_bytes": 499632792, + "rx_bytes_per_upload": 9987433, + "tx_bytes_per_upload": 9992656, + "max_delta_rss_bytes": 49352704 }, { "uploads": 50, "succeeded": 50, "failed": 0, - "duration_s": 4.661, + "duration_s": 2.859, "latency_ms": { - "p50": 656.5, - "p95": 888.8, - "p99": 959.9 + "p50": 218.9, + "p95": 429.5, + "p99": 473.5 }, "replicas": [ { - "instance_id": "7c7cf67931e5", - "delta_rx_bytes": 249639519, - "delta_tx_bytes": 249795892, - "baseline_rss_bytes": 281255936, + "instance_id": "90e2e1d73b23", + "delta_rx_bytes": 249691287, + "delta_tx_bytes": 249848369, + "baseline_rss_bytes": 243703808, "peak_memory_bytes": { - "rss": 326279168, - "heap_used": 49159264, - "external": 96056449, - "array_buffers": 80803439 + "rss": 247758848, + "heap_used": 49779768, + "external": 74267235, + "array_buffers": 70471924 }, - "delta_rss_bytes": 45023232, + "delta_rss_bytes": 4055040, "counters": { "attachments.insert_pending": 25, "attachments.proxy.bytes_in": 249036800, - "attachments.decode.ms": 7871.141386000323, + "attachments.decode.ms": 323.61892599996645, "attachments.proxy.bytes_to_s3": 249036800, "attachments.mark_ready": 25, "attachments.upload.created": 25 } }, { - "instance_id": "ff9a363e52b1", - "delta_rx_bytes": 249675448, - "delta_tx_bytes": 249820400, - "baseline_rss_bytes": 305864704, + "instance_id": "9bb9a19b4693", + "delta_rx_bytes": 249684697, + "delta_tx_bytes": 249842962, + "baseline_rss_bytes": 204165120, "peak_memory_bytes": { - "rss": 325267456, - "heap_used": 49459520, - "external": 94883105, - "array_buffers": 91092761 + "rss": 244056064, + "heap_used": 50327648, + "external": 69652092, + "array_buffers": 65858420 }, - "delta_rss_bytes": 19402752, + "delta_rss_bytes": 39890944, "counters": { "attachments.insert_pending": 25, "attachments.proxy.bytes_in": 249036800, - "attachments.decode.ms": 7501.386025000014, + "attachments.decode.ms": 374.5309960000159, "attachments.proxy.bytes_to_s3": 249036800, "attachments.mark_ready": 25, "attachments.upload.created": 25 } } ], - "total_delta_rx_bytes": 499314967, - "total_delta_tx_bytes": 499616292, - "rx_bytes_per_upload": 9986299, - "tx_bytes_per_upload": 9992326, - "max_delta_rss_bytes": 45023232 + "total_delta_rx_bytes": 499375984, + "total_delta_tx_bytes": 499691331, + "rx_bytes_per_upload": 9987520, + "tx_bytes_per_upload": 9993827, + "max_delta_rss_bytes": 39890944 }, { "uploads": 50, "succeeded": 50, "failed": 0, - "duration_s": 4.725, + "duration_s": 2.833, "latency_ms": { - "p50": 642.3, - "p95": 1021.8, - "p99": 1063.9 + "p50": 232.3, + "p95": 371.9, + "p99": 484.0 }, "replicas": [ { - "instance_id": "7c7cf67931e5", - "delta_rx_bytes": 249673539, - "delta_tx_bytes": 249815151, - "baseline_rss_bytes": 301092864, + "instance_id": "90e2e1d73b23", + "delta_rx_bytes": 249693755, + "delta_tx_bytes": 249824387, + "baseline_rss_bytes": 213168128, "peak_memory_bytes": { - "rss": 327974912, - "heap_used": 49201912, - "external": 94750424, - "array_buffers": 90960080 + "rss": 233091072, + "heap_used": 49724808, + "external": 74286513, + "array_buffers": 58931141 }, - "delta_rss_bytes": 26882048, + "delta_rss_bytes": 19922944, "counters": { "attachments.insert_pending": 25, "attachments.proxy.bytes_in": 249036800, - "attachments.decode.ms": 7622.966706999927, + "attachments.decode.ms": 245.89502999989782, "attachments.proxy.bytes_to_s3": 249036800, "attachments.mark_ready": 25, - "attachments.upload.created": 25 + "attachments.upload.created": 25, + "attachments.claim_expired": 1 } }, { - "instance_id": "ff9a363e52b1", - "delta_rx_bytes": 249648565, - "delta_tx_bytes": 249815222, - "baseline_rss_bytes": 296456192, + "instance_id": "9bb9a19b4693", + "delta_rx_bytes": 249643327, + "delta_tx_bytes": 249823027, + "baseline_rss_bytes": 214241280, "peak_memory_bytes": { - "rss": 307523584, - "heap_used": 50677504, - "external": 85057449, - "array_buffers": 81100125 + "rss": 245899264, + "heap_used": 50003816, + "external": 74661871, + "array_buffers": 52933830 }, - "delta_rss_bytes": 11067392, + "delta_rss_bytes": 31657984, "counters": { "attachments.insert_pending": 25, "attachments.proxy.bytes_in": 249036800, - "attachments.decode.ms": 7061.106053000025, + "attachments.decode.ms": 375.14921199998935, "attachments.proxy.bytes_to_s3": 249036800, "attachments.mark_ready": 25, - "attachments.upload.created": 25 + "attachments.upload.created": 25, + "attachments.claim_expired": 1 } } ], - "total_delta_rx_bytes": 499322104, - "total_delta_tx_bytes": 499630373, - "rx_bytes_per_upload": 9986442, - "tx_bytes_per_upload": 9992607, - "max_delta_rss_bytes": 26882048 + "total_delta_rx_bytes": 499337082, + "total_delta_tx_bytes": 499647414, + "rx_bytes_per_upload": 9986742, + "tx_bytes_per_upload": 9992948, + "max_delta_rss_bytes": 31657984 } ] } diff --git a/evidence/lab4/bench/proxy-9961472-c20.json b/evidence/lab4/bench/proxy-9961472-c20.json index aa8e977..d21da56 100644 --- a/evidence/lab4/bench/proxy-9961472-c20.json +++ b/evidence/lab4/bench/proxy-9961472-c20.json @@ -1,203 +1,203 @@ { - "date": "2026-10-23T13:38:46+00:00", - "git": "4badd5a", + "date": "2026-10-23T14:15:00+00:00", + "git": "4b53e03", "params": { "mode": "proxy", "size_bytes": 9961472, "concurrency": 20, "uploads_per_worker": 5, - "repeat": 3 + "repeat": 3, + "users": 20, + "image": null }, "host": { "nproc": 8, "mem_total_bytes": 16538955776 }, "api_container_limits_nanocpus_memory": [ - "1500000000 805306368", - "1500000000 805306368" + "1500000000 1073741824", + "1500000000 1073741824" ], "repeats": [ { "uploads": 100, "succeeded": 100, "failed": 0, - "duration_s": 8.833, + "duration_s": 5.725, "latency_ms": { - "p50": 1330.2, - "p95": 1656.1, - "p99": 1727.7 + "p50": 386.4, + "p95": 694.0, + "p99": 1065.1 }, "replicas": [ { - "instance_id": "7c7cf67931e5", - "delta_rx_bytes": 499759117, - "delta_tx_bytes": 499989656, - "baseline_rss_bytes": 261660672, + "instance_id": "90e2e1d73b23", + "delta_rx_bytes": 499431062, + "delta_tx_bytes": 499720016, + "baseline_rss_bytes": 219865088, "peak_memory_bytes": { - "rss": 388141056, - "heap_used": 50630264, - "external": 155166578, - "array_buffers": 139745634 + "rss": 256589824, + "heap_used": 50949776, + "external": 78382688, + "array_buffers": 74585512 }, - "delta_rss_bytes": 126480384, + "delta_rss_bytes": 36724736, "counters": { "attachments.insert_pending": 50, "attachments.proxy.bytes_in": 498073600, - "attachments.decode.ms": 15729.830076000188, + "attachments.decode.ms": 752.4353919999558, "attachments.proxy.bytes_to_s3": 498073600, "attachments.mark_ready": 50, "attachments.upload.created": 50 } }, { - "instance_id": "ff9a363e52b1", - "delta_rx_bytes": 499883600, - "delta_tx_bytes": 500123779, - "baseline_rss_bytes": 292487168, + "instance_id": "9bb9a19b4693", + "delta_rx_bytes": 499402749, + "delta_tx_bytes": 499684515, + "baseline_rss_bytes": 205688832, "peak_memory_bytes": { - "rss": 393953280, - "heap_used": 51133536, - "external": 142116265, - "array_buffers": 138325921 + "rss": 253865984, + "heap_used": 50007064, + "external": 77441306, + "array_buffers": 73644321 }, - "delta_rss_bytes": 101466112, + "delta_rss_bytes": 48177152, "counters": { "attachments.insert_pending": 50, "attachments.proxy.bytes_in": 498073600, - "attachments.decode.ms": 15020.501326000027, + "attachments.decode.ms": 689.5382070000051, "attachments.proxy.bytes_to_s3": 498073600, "attachments.mark_ready": 50, "attachments.upload.created": 50 } } ], - "total_delta_rx_bytes": 999642717, - "total_delta_tx_bytes": 1000113435, - "rx_bytes_per_upload": 9996427, - "tx_bytes_per_upload": 10001134, - "max_delta_rss_bytes": 126480384 + "total_delta_rx_bytes": 998833811, + "total_delta_tx_bytes": 999404531, + "rx_bytes_per_upload": 9988338, + "tx_bytes_per_upload": 9994045, + "max_delta_rss_bytes": 48177152 }, { "uploads": 100, "succeeded": 100, "failed": 0, - "duration_s": 8.864, + "duration_s": 5.595, "latency_ms": { - "p50": 1336.0, - "p95": 1742.8, - "p99": 1799.2 + "p50": 416.1, + "p95": 850.5, + "p99": 1043.3 }, "replicas": [ { - "instance_id": "7c7cf67931e5", - "delta_rx_bytes": 499464722, - "delta_tx_bytes": 499742563, - "baseline_rss_bytes": 380321792, + "instance_id": "90e2e1d73b23", + "delta_rx_bytes": 499433153, + "delta_tx_bytes": 499703916, + "baseline_rss_bytes": 232402944, "peak_memory_bytes": { - "rss": 402067456, - "heap_used": 50852712, - "external": 145616176, - "array_buffers": 130815545 + "rss": 259272704, + "heap_used": 51280096, + "external": 72760119, + "array_buffers": 68966438 }, - "delta_rss_bytes": 21745664, + "delta_rss_bytes": 26869760, "counters": { "attachments.insert_pending": 50, "attachments.proxy.bytes_in": 498073600, - "attachments.decode.ms": 15730.587417000032, + "attachments.decode.ms": 696.6430249999976, "attachments.proxy.bytes_to_s3": 498073600, "attachments.mark_ready": 50, - "attachments.upload.created": 50, - "attachments.claim_expired": 1 + "attachments.upload.created": 50 } }, { - "instance_id": "ff9a363e52b1", - "delta_rx_bytes": 499665326, - "delta_tx_bytes": 499906835, - "baseline_rss_bytes": 365027328, + "instance_id": "9bb9a19b4693", + "delta_rx_bytes": 499356462, + "delta_tx_bytes": 499635353, + "baseline_rss_bytes": 218791936, "peak_memory_bytes": { - "rss": 393994240, - "heap_used": 50916312, - "external": 127865497, - "array_buffers": 124075153 + "rss": 269750272, + "heap_used": 50527976, + "external": 84610578, + "array_buffers": 80809839 }, - "delta_rss_bytes": 28966912, + "delta_rss_bytes": 50958336, "counters": { "attachments.insert_pending": 50, "attachments.proxy.bytes_in": 498073600, - "attachments.decode.ms": 16026.04880199983, + "attachments.decode.ms": 679.306210000097, "attachments.proxy.bytes_to_s3": 498073600, "attachments.mark_ready": 50, - "attachments.upload.created": 50, - "attachments.claim_expired": 1 + "attachments.upload.created": 50 } } ], - "total_delta_rx_bytes": 999130048, - "total_delta_tx_bytes": 999649398, - "rx_bytes_per_upload": 9991300, - "tx_bytes_per_upload": 9996494, - "max_delta_rss_bytes": 28966912 + "total_delta_rx_bytes": 998789615, + "total_delta_tx_bytes": 999339269, + "rx_bytes_per_upload": 9987896, + "tx_bytes_per_upload": 9993393, + "max_delta_rss_bytes": 50958336 }, { "uploads": 100, "succeeded": 100, "failed": 0, - "duration_s": 9.064, + "duration_s": 5.614, "latency_ms": { - "p50": 1457.1, - "p95": 1774.1, - "p99": 1926.1 + "p50": 428.0, + "p95": 804.7, + "p99": 1004.9 }, "replicas": [ { - "instance_id": "7c7cf67931e5", - "delta_rx_bytes": 499401262, - "delta_tx_bytes": 499684797, - "baseline_rss_bytes": 357986304, + "instance_id": "90e2e1d73b23", + "delta_rx_bytes": 499425024, + "delta_tx_bytes": 499698391, + "baseline_rss_bytes": 229511168, "peak_memory_bytes": { - "rss": 410398720, - "heap_used": 50734960, - "external": 146163060, - "array_buffers": 132312269 + "rss": 276029440, + "heap_used": 50966520, + "external": 81342826, + "array_buffers": 77549156 }, - "delta_rss_bytes": 52412416, + "delta_rss_bytes": 46518272, "counters": { "attachments.insert_pending": 50, "attachments.proxy.bytes_in": 498073600, - "attachments.decode.ms": 16195.981729999883, + "attachments.decode.ms": 690.9916989999474, "attachments.proxy.bytes_to_s3": 498073600, "attachments.mark_ready": 50, "attachments.upload.created": 50 } }, { - "instance_id": "ff9a363e52b1", - "delta_rx_bytes": 499729379, - "delta_tx_bytes": 499980797, - "baseline_rss_bytes": 355852288, + "instance_id": "9bb9a19b4693", + "delta_rx_bytes": 499340690, + "delta_tx_bytes": 499623342, + "baseline_rss_bytes": 209854464, "peak_memory_bytes": { - "rss": 408215552, - "heap_used": 50802144, - "external": 136256487, - "array_buffers": 132466143 + "rss": 269647872, + "heap_used": 50830664, + "external": 84194138, + "array_buffers": 71282017 }, - "delta_rss_bytes": 52363264, + "delta_rss_bytes": 59793408, "counters": { "attachments.insert_pending": 50, "attachments.proxy.bytes_in": 498073600, - "attachments.decode.ms": 16008.327908000094, + "attachments.decode.ms": 772.5123690000619, "attachments.proxy.bytes_to_s3": 498073600, "attachments.mark_ready": 50, "attachments.upload.created": 50 } } ], - "total_delta_rx_bytes": 999130641, - "total_delta_tx_bytes": 999665594, - "rx_bytes_per_upload": 9991306, - "tx_bytes_per_upload": 9996656, - "max_delta_rss_bytes": 52412416 + "total_delta_rx_bytes": 998765714, + "total_delta_tx_bytes": 999321733, + "rx_bytes_per_upload": 9987657, + "tx_bytes_per_upload": 9993217, + "max_delta_rss_bytes": 59793408 } ] } diff --git a/evidence/lab4/bench/proxy-worst-c32.json b/evidence/lab4/bench/proxy-worst-c32.json new file mode 100644 index 0000000..baf3484 --- /dev/null +++ b/evidence/lab4/bench/proxy-worst-c32.json @@ -0,0 +1,207 @@ +{ + "date": "2026-10-23T14:16:28+00:00", + "git": "4b53e03", + "params": { + "mode": "proxy", + "size_bytes": 10485760, + "concurrency": 32, + "uploads_per_worker": 2, + "repeat": 3, + "users": 32, + "image": "tmp.n0I8NPEIWj.png" + }, + "host": { + "nproc": 8, + "mem_total_bytes": 16538955776 + }, + "api_container_limits_nanocpus_memory": [ + "1500000000 1073741824", + "1500000000 1073741824" + ], + "repeats": [ + { + "uploads": 64, + "succeeded": 63, + "failed": 1, + "duration_s": 25.819, + "latency_ms": { + "p50": 11818.4, + "p95": 12931.4, + "p99": 13553.9 + }, + "replicas": [ + { + "instance_id": "90e2e1d73b23", + "delta_rx_bytes": 337133327, + "delta_tx_bytes": 326730589, + "baseline_rss_bytes": 242167808, + "peak_memory_bytes": { + "rss": 764227584, + "heap_used": 53277928, + "external": 205747809, + "array_buffers": 201957465 + }, + "delta_rss_bytes": 522059776, + "counters": { + "attachments.insert_pending": 31, + "attachments.proxy.bytes_in": 325058560, + "attachments.decode.ms": 25036.73668600002, + "attachments.proxy.bytes_to_s3": 325058560, + "attachments.mark_ready": 31, + "attachments.upload.created": 31, + "attachments.claim_expired": 1 + } + }, + { + "instance_id": "9bb9a19b4693", + "delta_rx_bytes": 337211779, + "delta_tx_bytes": 337283965, + "baseline_rss_bytes": 228610048, + "peak_memory_bytes": { + "rss": 778199040, + "heap_used": 51989272, + "external": 236791924, + "array_buffers": 233001507 + }, + "delta_rss_bytes": 549588992, + "counters": { + "attachments.insert_pending": 32, + "attachments.proxy.bytes_in": 335544320, + "attachments.decode.ms": 25586.631086000038, + "attachments.proxy.bytes_to_s3": 335544320, + "attachments.mark_ready": 32, + "attachments.upload.created": 32, + "attachments.claim_expired": 1 + } + } + ], + "total_delta_rx_bytes": 674345106, + "total_delta_tx_bytes": 664014554, + "rx_bytes_per_upload": 10536642, + "tx_bytes_per_upload": 10375227, + "max_delta_rss_bytes": 549588992 + }, + { + "uploads": 64, + "succeeded": 63, + "failed": 1, + "duration_s": 25.757, + "latency_ms": { + "p50": 11572.1, + "p95": 12715.5, + "p99": 13392.7 + }, + "replicas": [ + { + "instance_id": "90e2e1d73b23", + "delta_rx_bytes": 334592209, + "delta_tx_bytes": 326276198, + "baseline_rss_bytes": 398258176, + "peak_memory_bytes": { + "rss": 783015936, + "heap_used": 55518080, + "external": 207730225, + "array_buffers": 203939881 + }, + "delta_rss_bytes": 384757760, + "counters": { + "attachments.insert_pending": 31, + "attachments.proxy.bytes_in": 325058560, + "attachments.decode.ms": 24831.425972000143, + "attachments.proxy.bytes_to_s3": 325058560, + "attachments.mark_ready": 31, + "attachments.upload.created": 31 + } + }, + { + "instance_id": "9bb9a19b4693", + "delta_rx_bytes": 336487647, + "delta_tx_bytes": 336637754, + "baseline_rss_bytes": 402874368, + "peak_memory_bytes": { + "rss": 798023680, + "heap_used": 53729504, + "external": 238180613, + "array_buffers": 234390237 + }, + "delta_rss_bytes": 395149312, + "counters": { + "attachments.insert_pending": 32, + "attachments.proxy.bytes_in": 335544320, + "attachments.decode.ms": 25634.232347999874, + "attachments.proxy.bytes_to_s3": 335544320, + "attachments.mark_ready": 32, + "attachments.upload.created": 32 + } + } + ], + "total_delta_rx_bytes": 671079856, + "total_delta_tx_bytes": 662913952, + "rx_bytes_per_upload": 10485623, + "tx_bytes_per_upload": 10358030, + "max_delta_rss_bytes": 395149312 + }, + { + "uploads": 64, + "succeeded": 63, + "failed": 1, + "duration_s": 25.464, + "latency_ms": { + "p50": 11705.5, + "p95": 12780.4, + "p99": 13430.4 + }, + "replicas": [ + { + "instance_id": "90e2e1d73b23", + "delta_rx_bytes": 336576208, + "delta_tx_bytes": 326212836, + "baseline_rss_bytes": 429645824, + "peak_memory_bytes": { + "rss": 788910080, + "heap_used": 51970176, + "external": 237910954, + "array_buffers": 234120537 + }, + "delta_rss_bytes": 359264256, + "counters": { + "attachments.insert_pending": 31, + "attachments.proxy.bytes_in": 325058560, + "attachments.decode.ms": 24706.14007100009, + "attachments.proxy.bytes_to_s3": 325058560, + "attachments.mark_ready": 31, + "attachments.upload.created": 31, + "attachments.claim_expired": 1 + } + }, + { + "instance_id": "9bb9a19b4693", + "delta_rx_bytes": 336605411, + "delta_tx_bytes": 336677870, + "baseline_rss_bytes": 444702720, + "peak_memory_bytes": { + "rss": 810758144, + "heap_used": 54356496, + "external": 217451321, + "array_buffers": 213660977 + }, + "delta_rss_bytes": 366055424, + "counters": { + "attachments.insert_pending": 32, + "attachments.proxy.bytes_in": 335544320, + "attachments.decode.ms": 25312.452498999774, + "attachments.proxy.bytes_to_s3": 335544320, + "attachments.mark_ready": 32, + "attachments.upload.created": 32, + "attachments.claim_expired": 1 + } + } + ], + "total_delta_rx_bytes": 673181619, + "total_delta_tx_bytes": 662890706, + "rx_bytes_per_upload": 10518463, + "tx_bytes_per_upload": 10357667, + "max_delta_rss_bytes": 366055424 + } + ] +} diff --git a/evidence/lab4/decode-memory.txt b/evidence/lab4/decode-memory.txt index 6a6bbf2..9bf773d 100644 --- a/evidence/lab4/decode-memory.txt +++ b/evidence/lab4/decode-memory.txt @@ -1,7 +1,8 @@ -# container /mtusi-lab4-api-1, limits: 805306368 bytes, VIPS_DISC_THRESHOLD=1g; commit a06471a+worktree -jpeg 7728x5152 3ch uchar bytes=4921012 decode_ms=58 peak_delta_rss_mib=3.9 ok -jpeg 7728x5152 3ch uchar progressive bytes=4826968 decode_ms=278 peak_delta_rss_mib=117.7 ok -jpeg 7728x5152 4ch uchar bytes=10601868 decode_ms=161 peak_delta_rss_mib=7.7 ok -png 8000x5000 4ch ushort bytes=1420114 decode_ms=496 peak_delta_rss_mib=66.6 ok -png 8000x5000 4ch ushort progressive bytes=364096 decode_ms=1270 peak_delta_rss_mib=338.6 ok -png 8000x5000 3ch uchar progressive palette bytes=61042 decode_ms=341 peak_delta_rss_mib=126.0 ok +# container /mtusi-lab4-api-1, memory limit 1073741824 bytes, VIPS_DISC_THRESHOLD=1g, commit 4b53e03; same pipeline as ImageDecoder +jpeg 7728x5152 3ch uchar bytes=4921012 decode_ms=61 peak_delta_rss_mib=4.5 ok +jpeg 7728x5152 3ch uchar progressive bytes=4826968 decode_ms=273 peak_delta_rss_mib=118.1 ok +jpeg 7728x5152 4ch uchar bytes=10601868 decode_ms=159 peak_delta_rss_mib=7.5 ok +png 8000x5000 4ch ushort bytes=1420114 decode_ms=524 peak_delta_rss_mib=67.1 ok +png 8000x5000 4ch ushort progressive bytes=364096 decode_ms=1231 peak_delta_rss_mib=338.5 ok +png 8000x5000 3ch uchar progressive palette bytes=61042 decode_ms=356 peak_delta_rss_mib=126.0 ok +png 8000x5000 4ch ushort progressive bytes=10485760 decode_ms=707 peak_delta_rss_mib=338.4 ok diff --git a/evidence/lab4/direct-ttl-short.txt b/evidence/lab4/direct-ttl-short.txt index 2f06310..f9028ae 100644 --- a/evidence/lab4/direct-ttl-short.txt +++ b/evidence/lab4/direct-ttl-short.txt @@ -3,6 +3,6 @@ The plugin "vite-tsconfig-paths" is detected. Vite now supports tsconfig paths resolution natively via the resolve.tsconfigPaths option. You can remove the plugin and set resolve.tsconfigPaths: true in your Vite config instead. RUN v4.1.11 /home/tomato/Projects/VP/mtusi2026lab4/app Test Files 1 passed (1) - Tests 9 passed (9) - Start at 16:31:20 - Duration 8.28s (transform 48ms, setup 0ms, import 72ms, tests 8.12s, environment 0ms) + Tests 10 passed (10) + Start at 17:11:07 + Duration 8.19s (transform 48ms, setup 0ms, import 72ms, tests 8.02s, environment 0ms) diff --git a/evidence/lab4/make-test-dependencies.txt b/evidence/lab4/make-test-dependencies.txt index 3900886..5405030 100644 --- a/evidence/lab4/make-test-dependencies.txt +++ b/evidence/lab4/make-test-dependencies.txt @@ -4,6 +4,6 @@ cd app && E2E_COMPOSE_DIR="/home/tomato/Projects/VP/mtusi2026lab4" E2E_COMPOSE_E The plugin "vite-tsconfig-paths" is detected. Vite now supports tsconfig paths resolution natively via the resolve.tsconfigPaths option. You can remove the plugin and set resolve.tsconfigPaths: true in your Vite config instead. RUN v4.1.11 /home/tomato/Projects/VP/mtusi2026lab4/app Test Files 1 passed (1) - Tests 6 passed (6) - Start at 16:34:39 - Duration 124.94s (transform 75ms, setup 0ms, import 94ms, tests 124.75s, environment 0ms) + Tests 7 passed (7) + Start at 17:11:25 + Duration 140.04s (transform 65ms, setup 0ms, import 80ms, tests 139.87s, environment 0ms) diff --git a/evidence/lab4/make-test-e2e.txt b/evidence/lab4/make-test-e2e.txt index bf6dd22..d7c3b7f 100644 --- a/evidence/lab4/make-test-e2e.txt +++ b/evidence/lab4/make-test-e2e.txt @@ -3,6 +3,6 @@ The plugin "vite-tsconfig-paths" is detected. Vite now supports tsconfig paths resolution natively via the resolve.tsconfigPaths option. You can remove the plugin and set resolve.tsconfigPaths: true in your Vite config instead. RUN v4.1.11 /home/tomato/Projects/VP/mtusi2026lab4/app Test Files 3 passed | 1 skipped (4) - Tests 38 passed | 8 skipped (46) - Start at 16:39:49 - Duration 4.15s (transform 319ms, setup 0ms, import 598ms, tests 8.73s, environment 0ms) + Tests 44 passed | 9 skipped (53) + Start at 17:10:37 + Duration 6.55s (transform 310ms, setup 0ms, import 591ms, tests 12.84s, environment 0ms) diff --git a/evidence/lab4/summary.md b/evidence/lab4/summary.md index c5e16e8..679f503 100644 --- a/evidence/lab4/summary.md +++ b/evidence/lab4/summary.md @@ -1,9 +1,11 @@ -| mode | size, MiB | C | ok | API rx/upload, MiB | API tx/upload, MiB | max Δrss, MiB | p50, ms | p95, ms | -|---|---|---|---|---|---|---|---|---| -| direct | 0.12 | 10 | 150/150 | 0.13 | 0.01 | 5.25 | 72 | 120 | -| proxy | 0.12 | 10 | 150/150 | 0.13 | 0.13 | 3.00 | 57 | 87 | -| direct | 1.00 | 10 | 150/150 | 1.01 | 0.01 | 1.38 | 154 | 252 | -| proxy | 1.00 | 10 | 150/150 | 1.01 | 1.01 | 2.00 | 132 | 183 | -| direct | 9.50 | 10 | 150/150 | 9.52 | 0.01 | 83.62 | 755 | 1018 | -| proxy | 9.50 | 10 | 150/150 | 9.52 | 9.53 | 42.94 | 642 | 889 | -| proxy | 9.50 | 20 | 300/300 | 9.53 | 9.53 | 49.98 | 1336 | 1743 | +| mode | size, MiB | C | ok | API rx/upload, MiB | API tx/upload, MiB | max Δrss, MiB | peak RSS, MiB | p50, ms | p95, ms | +|---|---|---|---|---|---|---|---|---|---| +| direct | 0.12 | 10 | 150/150 | 0.13 | 0.01 | 2.00 | 158.24 | 45 | 70 | +| proxy | 0.12 | 10 | 150/150 | 0.13 | 0.13 | 6.38 | 149.36 | 28 | 49 | +| direct | 1.00 | 10 | 150/150 | 1.01 | 0.01 | 16.06 | 199.36 | 76 | 104 | +| proxy | 1.00 | 10 | 150/150 | 1.01 | 1.01 | 8.75 | 183.10 | 56 | 100 | +| direct | 9.50 | 10 | 150/150 | 9.52 | 0.01 | 88.92 | 286.69 | 425 | 615 | +| proxy | 9.50 | 10 | 150/150 | 9.52 | 9.53 | 38.04 | 236.28 | 232 | 430 | +| proxy | 9.50 | 20 | 300/300 | 9.53 | 9.53 | 48.60 | 263.24 | 416 | 805 | +| direct (tmp.n0I8NPEIWj.png) | 10.00 | 32 | 144/192 | 7.52 | 0.01 | 366.84 | 787.07 | 10903 | 13413 | +| proxy (tmp.n0I8NPEIWj.png) | 10.00 | 32 | 189/192 | 10.03 | 9.88 | 376.84 | 773.20 | 11706 | 12780 | diff --git a/evidence/lab4/unit-tests.txt b/evidence/lab4/unit-tests.txt index 5c51ded..348e65c 100644 --- a/evidence/lab4/unit-tests.txt +++ b/evidence/lab4/unit-tests.txt @@ -1,6 +1,6 @@ -[Nest] 3895186 - 10/23/2026, 4:39:54 PM WARN [MessagesCacheService] Cache fill failed: redis down -[Nest] 3895204 - 10/23/2026, 4:39:56 PM WARN [AttachmentsService] Compensation of attachment 5f9c0c33-dfa1-42a3-80a8-37f3ea9ef571 deferred: Connection terminated unexpectedly - Test Files 12 passed (12) - Tests 43 passed (43) - Start at 16:39:54 - Duration 2.47s (transform 762ms, setup 0ms, import 7.87s, tests 495ms, environment 2ms) +[Nest] 4013602 - 10/23/2026, 5:10:35 PM WARN [MessagesCacheService] Cache fill failed: redis down +[Nest] 4013620 - 10/23/2026, 5:10:37 PM WARN [AttachmentsService] Compensation of attachment 2dc5fe05-aac7-484f-935e-186a935e9224 deferred: Connection terminated unexpectedly + Test Files 13 passed (13) + Tests 48 passed (48) + Start at 17:10:34 + Duration 2.68s (transform 652ms, setup 0ms, import 8.56s, tests 1.95s, environment 2ms) diff --git a/scripts/lab4/attachments_bench.py b/scripts/lab4/attachments_bench.py index 3ed8e62..9e5151d 100755 --- a/scripts/lab4/attachments_bench.py +++ b/scripts/lab4/attachments_bench.py @@ -104,41 +104,56 @@ def percentile(values, fraction): def one_upload(env, mode, token, chat_id, data, seed): + """Returns (ok, elapsed_ms, outcome); outcome names the failing step and status, e.g. "complete:429".""" digest = hashlib.sha256(data).hexdigest() filename = f"bench-{seed}.png" port = int(env.get("APP_PUBLIC_PORT", "8080")) started = time.perf_counter() - if mode == "proxy": - status, payload = request( - "127.0.0.1", port, "POST", - f"/api/v1/chats/{chat_id}/attachments?filename={urllib.parse.quote(filename)}", - {"authorization": f"Bearer {token}", "content-type": "image/png"}, data, - ) - ok = status == 201 - attachment = json.loads(payload) if ok else None - else: - status, ticket = api_json( - env, "POST", f"/api/v1/chats/{chat_id}/attachments/direct-uploads", token, - {"filename": filename, "content_type": "image/png", "size_bytes": len(data), "sha256": digest}, - ) - ok = status == 201 - attachment = None - if ok: - target = urllib.parse.urlsplit(ticket["url"]) - put_status, _ = request( - target.hostname, target.port, "PUT", target.path + "?" + target.query, - {**ticket["headers"]}, data, + outcome, attachment = "ok", None + try: + if mode == "proxy": + status, body = request( + "127.0.0.1", port, "POST", + f"/api/v1/chats/{chat_id}/attachments?filename={urllib.parse.quote(filename)}", + {"authorization": f"Bearer {token}", "content-type": "image/png"}, data, ) - ok = put_status == 200 - if ok: - status, attachment = api_json( - env, "POST", f"/api/v1/attachments/{ticket['attachment_id']}/complete", token + if status == 201: + attachment = json.loads(body) + else: + outcome = f"upload:{status}" + else: + headers = {"authorization": f"Bearer {token}", "content-type": "application/json"} + status, body = request( + "127.0.0.1", port, "POST", f"/api/v1/chats/{chat_id}/attachments/direct-uploads", headers, + json.dumps({"filename": filename, "content_type": "image/png", + "size_bytes": len(data), "sha256": digest}).encode(), + ) + if status != 201: + outcome = f"init:{status}" + else: + ticket = json.loads(body) + target = urllib.parse.urlsplit(ticket["url"]) + put_status, _ = request( + target.hostname, target.port, "PUT", target.path + "?" + target.query, + {**ticket["headers"]}, data, ) - ok = status == 200 + if put_status != 200: + outcome = f"put:{put_status}" + else: + status, body = request( + "127.0.0.1", port, "POST", f"/api/v1/attachments/{ticket['attachment_id']}/complete", + {"authorization": f"Bearer {token}"}, + ) + if status == 200: + attachment = json.loads(body) + else: + outcome = f"complete:{status}" + except (OSError, http.client.HTTPException, ValueError) as error: + outcome = f"error:{type(error).__name__}" elapsed_ms = (time.perf_counter() - started) * 1000 - if ok and (attachment is None or attachment["sha256"] != digest): - ok = False - return ok, elapsed_ms + if outcome == "ok" and (attachment is None or attachment["sha256"] != digest): + outcome = "checksum_mismatch" + return outcome == "ok", elapsed_ms, outcome def payload(args, seed): @@ -155,6 +170,7 @@ def run_once(env, args, actors, ids): baseline = {c: metrics(c) for c in ids} net_before = {c: net_bytes(c) for c in ids} latencies, failures = [], [] + outcomes = {} lock = threading.Lock() def worker(index): @@ -162,9 +178,10 @@ def run_once(env, args, actors, ids): seed = index * 1000 + step data = payload(args, seed) token, chat_id = actors[index % len(actors)] - ok, elapsed = one_upload(env, args.mode, token, chat_id, data, seed) + ok, elapsed, outcome = one_upload(env, args.mode, token, chat_id, data, seed) with lock: (latencies if ok else failures).append(elapsed) + outcomes[outcome] = outcomes.get(outcome, 0) + 1 started = time.perf_counter() threads = [threading.Thread(target=worker, args=(i,)) for i in range(args.concurrency)] @@ -195,6 +212,7 @@ def run_once(env, args, actors, ids): "uploads": total, "succeeded": len(latencies), "failed": len(failures), + "outcomes": outcomes, "duration_s": round(duration, 3), "latency_ms": { "p50": round(percentile(latencies, 0.50), 1), @@ -264,7 +282,8 @@ def command_run(args): for index, item in enumerate(repeats): print(f"repeat {index + 1}: ok={item['succeeded']}/{item['uploads']} " f"rx/upload={item['rx_bytes_per_upload']} tx/upload={item['tx_bytes_per_upload']} " - f"maxΔrss={item['max_delta_rss_bytes']} p50={item['latency_ms']['p50']}ms") + f"maxΔrss={item['max_delta_rss_bytes']} p50={item['latency_ms']['p50']}ms " + f"outcomes={item['outcomes']}") def mib(value): @@ -282,15 +301,21 @@ def command_summarize(args): label = p["mode"] + (f" ({p['image']})" if p.get("image") else "") rows.append((label, p["size_bytes"], p["concurrency"], reps, med, data)) rows.sort(key=lambda r: (r[0].count("("), r[1], r[0], r[2])) - print("| mode | size, MiB | C | ok | API rx/upload, MiB | API tx/upload, MiB | max Δrss, MiB | peak RSS, MiB | p50, ms | p95, ms |") - print("|---|---|---|---|---|---|---|---|---|---|") + print("| mode | size, MiB | C | ok | failures | API rx/upload, MiB | API tx/upload, MiB | max Δrss, MiB | peak RSS, MiB | p50, ms | p95, ms |") + print("|---|---|---|---|---|---|---|---|---|---|---|") for mode, size, conc, reps, med, _data in rows: peak = max(x["peak_memory_bytes"]["rss"] for r in reps for x in r["replicas"]) + failed = {} + for rep in reps: + for name, count in rep.get("outcomes", {}).items(): + if name != "ok": + failed[name] = failed.get(name, 0) + count + failures = ", ".join(f"{name}×{count}" for name, count in sorted(failed.items())) or "—" ok = sum(r["succeeded"] for r in reps) total = sum(r["uploads"] for r in reps) p50 = statistics.median(r["latency_ms"]["p50"] for r in reps) p95 = statistics.median(r["latency_ms"]["p95"] for r in reps) - print(f"| {mode} | {mib(size)} | {conc} | {ok}/{total} | {mib(med('rx_bytes_per_upload'))} | " + print(f"| {mode} | {mib(size)} | {conc} | {ok}/{total} | {failures} | {mib(med('rx_bytes_per_upload'))} | " f"{mib(med('tx_bytes_per_upload'))} | {mib(med('max_delta_rss_bytes'))} | {mib(peak)} | {p50:.0f} | {p95:.0f} |") diff --git a/scripts/lab4/run_matrix.sh b/scripts/lab4/run_matrix.sh index 7edd275..2c6578c 100755 --- a/scripts/lab4/run_matrix.sh +++ b/scripts/lab4/run_matrix.sh @@ -22,8 +22,9 @@ bench proxy 9961472 20 # Worst case for memory: every request carries the heaviest valid image # (40 MP RGBA16 Adam7 PNG padded to 10 MiB, ~340 MiB per decode) and C=32 # saturates UPLOAD_MAX_IN_FLIGHT (16) on both replicas. -worst=$(mktemp --suffix=.png) -trap 'rm -f "$worst"' EXIT +tmp=$(mktemp -d) +trap 'rm -rf "$tmp"' EXIT +worst="$tmp/worst-40mp-rgba16-adam7.png" python3 scripts/lab4/pngkit.py > "$worst" for mode in proxy direct; do echo "== $mode worst-case image c=32"