このページは https://speakerdeck.com/adrianhardy/put-lamp-on-a-diet の内容を掲載しています。
As web programmers, we’ve been spoilt with the luxury of powerful servers as the cost of memory a...
As web programmers, we’ve been spoilt with the luxury of powerful servers as the cost of memory and processing power plummets. The advent of the micro-computer (e.g. the ubiquitous Raspberry PI) has meant that we’re now back to a constrained environment. To paraphrase a famous misquote; “256MB RAM ought to be enough for anybody”. This talk is about getting the overhead of your web stack down. For database and web services and the PHP binaries themselves, we’ll discuss the process of finding lightweight replacements for PHP’s usual entourage. Once the stack is trimmed down, we then need to refocus on our choice of frameworks and even approaches to writing memory and CPU efficient applications. Being sensitive to resource consumption shouldn’t be a novelty. While no-one wants to advocate premature optimisation, if you know what you can squeeze out of PHP’s stack in a memory constrained environment, you should be able to take those principles when approaching a problem more conventional hardware.