{"id": "c01", "output": "Yesterday our Postgres table was three times larger than the actual data. We checked `n_dead_tup` and found that about 40 percent of the rows were dead. Autovacuum couldn't keep up because the scale factor was at the default of 0.2, which is far too high for a table with 50 million rows. After we lowered it to 0.01, the bloat stopped growing within two days.", "seconds": 1.2, "input_tokens": 224, "output_tokens": 123, "error": null}
{"id": "c02", "output": "Our Kubernetes pods kept restarting, getting OOMKilled every 15 minutes. We found that the memory limit was 512Mi, but the Java app needs at least 900Mi. The heap was set to -Xmx768m, and metaspace also takes up memory on top of that. Raising the limit to 1Gi fixed it, but honestly, we should have set the heap with MaxRAMPercentage from the beginning.", "seconds": 1.18, "input_tokens": 229, "output_tokens": 140, "error": null}
{"id": "c03", "output": "A ClickHouse query was taking 9 seconds and scanning 10 million rows even when filtering by user_id. The reason was simple: user_id was not in the ORDER BY key, which was (site_id, event_time). We added a bloom_filter skip index with GRANULARITY 4, and now the query reads only 400 thousand rows and finishes in 0.3 seconds.", "seconds": 1.14, "input_tokens": 224, "output_tokens": 124, "error": null}
{"id": "c04", "output": "I tried running a 7B model locally on my laptop with 16 GB of RAM. It worked, but it was slow, around 4 tokens per second. Once the context went above 8k, it became very, very slow and the laptop fan went crazy. Q4_K_M quantization helped a little: memory dropped from 14 GB to around 5 GB, but the speed was still not great for chat.", "seconds": 1.18, "input_tokens": 219, "output_tokens": 124, "error": null}
{"id": "c05", "output": "Our nginx was returning 502 errors for around 3 percent of requests during peak traffic. The upstream keepalive was not configured, so every request was opening a new connection to the Node app. After adding `keepalive 64` to the upstream block and setting `proxy_http_version 1.1`, the 502s dropped to almost zero and p99 latency fell from 1.8s to 420ms.", "seconds": 1.02, "input_tokens": 218, "output_tokens": 127, "error": null}
{"id": "c06", "output": "We moved our logs from Elasticsearch to ClickHouse last month. Storage dropped from 2.1 TB to 310 GB thanks to columnar compression with ZSTD. Queries over the last 7 days, which used to take 40 seconds, now finish in under 2 seconds. The only thing we miss is full-text search. For now we're using an ngrambf_v1 index for that, but it isn't perfect.", "seconds": 1.24, "input_tokens": 227, "output_tokens": 137, "error": null}
{"id": "c07", "output": "Redis was using 28 GB of memory, and we were considering buying a bigger server. When we ran MEMORY USAGE on the keys, we found session keys without a TTL, around 9 million of them, some two years old. We added an EXPIRE of 30 days to new sessions and cleaned up the old ones with a SCAN script. Memory dropped to 6 GB.", "seconds": 1.09, "input_tokens": 222, "output_tokens": 121, "error": null}
{"id": "c08", "output": "For our daily report job, we switched from a hosted API to a local LLM. The job runs at 2 AM, processes about 120 reports, and finishes before 7 AM. Each report takes roughly 2 to 3 minutes on CPU. Users receive their replies within 48 hours, so speed matters less than accuracy. What matters most is that the numbers in each report are correct.", "seconds": 3.02, "input_tokens": 208, "output_tokens": 122, "error": null}
{"id": "c09", "output": "The git repo had grown to 4.5 GB, and cloning it took 12 minutes in CI. The cause turned out to be large video files that someone had committed about three years ago. We used `git filter-repo` to strip those files from history and moved the remaining assets to Git LFS. The repo is now 380 MB, and the CI clone takes 40 seconds. Note that everyone needs to re-clone after the history rewrite.", "seconds": 1.45, "input_tokens": 216, "output_tokens": 137, "error": null}
{"id": "c10", "output": "We were paying $1,400 per month for a single large RDS instance (db.r6g.4xlarge), yet CPU usage sat at around 15 percent most of the time. We moved to a db.r6g.xlarge instance and added a read replica for reporting. Our total database cost is now $520 per month, and the application is actually faster, because heavy report queries no longer compete with user traffic.", "seconds": 1.24, "input_tokens": 216, "output_tokens": 125, "error": null}
