3 ms·
What you're describing is business as usual in any enterprise shop... 1. hardware requirements call for an absurd capacity for applications with just a few hun
by CrLf 12y ago
What you're describing is business as usual in any enterprise shop...
1. hardware requirements call for an absurd capacity for applications with just a few hundred users
2. developers then proceed to utterly waste the available resources because they seem to be infinite and "nobody cares"
3. the application ends up being slow as molasses and the hardware requirements for the next similar project become even bigger
(There's also a number 4 in here, which is the belief that every high-traffic website has a Google-sized datacenter behind it, which is simply not true. You can serve millions of users with just a few machines.)
This is a never-ending cycle of wastefulness just because nobody ever stops to think about how the machines work and how to apply proper algorithms. The classic argument of developer time vs. hardware costs is a funny one: often bad solutions take just as long as good solutions to implement. But the latter require knowledge that many developers seem to lack and it's easy to think that smart == time.
Take ORMs like Hibernate. Developers use them because it saves them time, but then weeks are wasted trying to optimize the applications in the wrong places just to avoid having to think about what's under the ORM. I used to be a DBA and performance improvements of over 1000x were pretty common just by creating a few indexes in 5 minutes of my time (this was actually fun... "your operation that took 30 seconds now takes 100ms, you're welcome"). All while developers looked around their own code trying to fix the wrong thing.
Memory initialization is another example: I've been in the situation where an application was generating hundreds of MB of new objects per second, which I pointed might be the cause for it to be so slow (it was certainly the cause for it to eventually crash as the GC couldn't catch up). They still wasted days looking at other things until finally understanding that this behavior meant the CPU was working as if it had no cache at all.
Oh, and the constant complaints that the machines were slow when they were sistematically under 10% utilization? Locking and IO latency are also alien concepts for some...
- Sami_Lehtinen 12y agoIt's wonderful to see posts like this. I've been often very frustrated by exactly similar issues. But this seems to be much more common than I thought. One guy used select max(id) from table; for over 5gb table without id column index, periodically. It took quite a while every time maxing the disk I/O. Usually developers claim that the server doesn't have enough memory or it should jave more cores and we should buy enterprise SSDs. Which is simply insane when you could fix the issue very easily.