5 ms·
Memory will be the real performance bottleneck on your VPS
- Kliment 17y agoIn other words, it makes sense to switch to a very low overhead web server. How does quixote or node compare in terms of memory performance?
- bhousel 17y agoI don't think Quixote or Node are web servers.. Also, the author mentioned that he is using php.
- charlesmarshall 17y agoI don't think that's what was meant ... If youre on a host that has half the cpu but 3 times the RAM then more processes are queued. During a heavy load the larger RAM will mean more threads can be handled as there is space to store them in memory. As you have a slower cpu it will take a bit longer, but you should fulfill more of the incoming requests.
- pmjordan 17y agoThis is of course only true if response times are largely I/O bound. If the CPU time spent on a response is almost the same as its walltime, more RAM is useless.
- Aegean 17y agoI think it all depends on use scenarios, not to mention the fact that VPS neighbours may change the results a lot. However this post was particularly true for my case. I use OpenVZ and today I had to upgrade to a 1024MB server simply because memory was not enough to process requests.
- moon_of_moon 17y agoApache has pluggable concurrency modules (MPM's) and you can switch to a multiple-threads per process MPM if you choose. When the limit is hit, it will fork a new process. Each new thread stack is not more than an MB or two, so based on your calculations, you can do much better.
- pmjordan 17y agoEven if you're forking processes for concurrency, all memory pages assigned to the process at fork time are shared and use copy-on-write semantics, so anything that doesn't change doesn't consume real memory in each additional process. I don't know how much outside of each thread's/process's heap and stack sees writes in apache, but I suspect the difference between threads and processes is pretty slim in this respect.
- moon_of_moon 17y agoNo, you are assuming that 20 MB number is all heap. Wrong assumption. Anyway this article is flawed about the number of MB each process uses because I think hes using PS to get the numbers and that shows shared libraries too. Shared, as in single code segment used by all the processes. Also he's making bad assumptions about the work load. Shit maybe I should blog.
- adatta02 17y agoAnother thing to consider is physical disk i/o. I know on our VPS (its not hosted with one of the big guys), if one of our VPS "neighbours" does something IO heavy like importing a big MySQL database they can basically bring our VPS to a crawl.
- mmaunder 17y agoActually, no it wont. It's probably going to be IO and then CPU. http://news.ycombinator.com/item?id=970682 http://news.ycombinator.com/item?id=970682