←back to thread

362 points tosh | 1 comments | | HN request time: 0.204s | source
Show context
gwbas1c ◴[] No.42069673[source]
Classic story of a startup taking a "good enough" shortcut and then coming back later to optimize.

---

I have a similar story: Where I work, we had a cluster of VMs that were always high CPU and a bit of a problem. We had a lot of fire drills where we'd have to bump up the size of the cluster, abort in-progress operations, or some combination of both.

Because this cluster of VMs was doing batch processing that the founder believed should be CPU intense, everyone just assumed that increasing load came with increasing customer size; and that this was just an annoyance that we could get to after we made one more feature.

But, at one point the bean counters pointed out that we spent disproportionately more on cloud than a normal business did. After one round of combining different VM clusters (that really didn't need to be separate servers), I decided that I could take some time to hook up this very CPU intense cluster up to a profiler.

I thought I was going to be in for a 1-2 week project and would follow a few worms. Instead, the CPU load was because we were constantly loading an entire table, that we never deleted from, into the application's process. The table had transient data that should only last a few hours at most.

I quickly deleted almost a decade's worth of obsolete data from the table. After about 15 minutes, CPU usage for this cluster dropped to almost nothing. The next day we made the VM cluster a fraction of its size, and in the next release, we got rid of the cluster and merged the functionality into another cluster.

I also made a pull request that introduced a simple filter to the query to only load 3 days of data; and then introduced a background operation to clean out the table periodically.

replies(6): >>42070228 #>>42070679 #>>42072931 #>>42073139 #>>42073360 #>>42073568 #
declan_roberts ◴[] No.42073360[source]
I love these stories. I have a few as well. In the end I know we're all just doing our job, but I've been tempted at times to say to my manager: "I will save the company $10k/month tomorrow if you give me a cut of the pie."
replies(1): >>42075417 #
euroderf ◴[] No.42075417[source]
This should be the norm, actually.

It drives ya nuts to read a story where some guy on the shop floor saves his employer ten million dollars and to reward him they give him a 20% off coupon for Home Depot.

replies(3): >>42077354 #>>42077970 #>>42078375 #
zuhsetaqi ◴[] No.42077970[source]
> It drives ya nuts to read a story where some guy on the shop floor saves his employer ten million dollars and to reward him they give him a 20% off coupon for Home Depot.

It’s your job as an employee, it’s why you get paid in the first place

replies(2): >>42087759 #>>42095626 #
1. evoke4908 ◴[] No.42095626[source]
Uh, no. Have you ever been employed? Your job is what is laid out in your contract, period. You are paid to do that specific set of tasks and nothing else. "Other duties as required" be damned.

Fixing the business is very explicitly not your job, and is absolutely not what you're paid for. Any value you create for the business outside of those bounds is at your own cost and you absolutely will not be compensated unless the business is so small you don't have six layers of management trying to extract any kind of promotion.