3 ms·
Wait a minute -- I'm not a sysadmin guy, but all the servers I've ever dealt with had swapping / virtual memory turned off. Because you'd rather a web request f
by crazygringo 14y ago
Wait a minute -- I'm not a sysadmin guy, but all the servers I've ever dealt with had swapping / virtual memory turned off. Because you'd rather a web request failed, then start churning things on disk.
When you're dealing with a web cache, don't you want to explicitly know whether your cache contents are in memory or on disk, and be able to fine-tune that? It seems like the last thing you want is the OS making decisions about memory vs disk for you. Am I missing something?
- mrb 14y agoYes you are missing something. Varnish doesn't use the swap. Varnish uses regular files, cached in memory via the kernel's regular buffercache mechanism.
- wmf 14y agoWhen you're dealing with a web cache, don't you want to explicitly know whether your cache contents are in memory or on disk, and be able to fine-tune that? The point of this article is that you think you want to control that, but you actually don't. The kernel can probably do a fine job. (Of course, PHK develops the kernel, so when it doesn't do what he wants he can just change it. Many others are not so lucky.) PHK is telling normal programmers to follow the rules; extraordinary ninja rockstar programmers are smart enough to know when to break the rules. If you want extremely high performance you should manage everything yourself, but this is so difficult to do right that documenting how to do it would just encourage people to shoot themselves in the foot. On a practical note, which is faster, HAProxy or Varnish?
- miah_ 14y agoHAProxy isn't a cache. Its not a good comparison.