Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a weird kind of problem. I host a small webshop, it´s nothing big perhaps 20 visitors per day and a few orders per week. I will probably expand it a bit but I doubt it will grow very large.

Anyway, my problem is that I came across a VPS with about 6gb ram and 6 cores really cheap. And now I have this VPS with much more power than I really ever will need.

So now to my question. I run CentOS, nginx, php-fpm and mysql on it and it works great, but since I do not really need all that ram to processing, how can I make my VPS consume more ram to make it faster? Could you give me some broad advice? Thanks!

share|improve this question

closed as not constructive by Bryan, rnxrx, HopelessN00b, EEAA, Ward Oct 26 '12 at 3:52

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

3  
Minecraft server? –  Chopper3 Oct 25 '12 at 15:33
    
@Chopper3 game servers are a great idea! –  deltree Oct 25 '12 at 18:33

5 Answers 5

up vote 11 down vote accepted

Let linux use it to cache files, which it will do automatically. This question talks about how to make Linux go at this harder: http://unix.stackexchange.com/questions/30286/can-i-configure-my-linux-system-for-more-aggressive-file-system-caching

but you probably don't need to.

Alternatively, you could use memcached to speed up popular queries, but this makes your system more complex.. quite a lot more complex.

Good motto: If it ain't broke, don't fix it.

share|improve this answer
    
That is actually a very good motto, think I will try to stick to it. Interesting link as well. Thanks! –  Stgmk Oct 25 '12 at 15:50

In addition to Tom's answer....if you're not already using an opcode cahce, then get one (this should actually reduce your memory usage - but it will make stuff go faster!)

Make sure you've got the query cache enabled on MySQL and allocated lots of space for the buffers - this is a very complex topic to cover here - but running mysqltuner.pl against the DBMS should flag up any areas where there are clear performance benefits.

share|improve this answer
    
To add, this is a trial & error task. You'll get suggestions from the tuner symcbean recommended and as you implement the various changes, you should be logging the performance via Zabbix, Nagios, etc. for comparison –  bmurtagh Oct 25 '12 at 15:57

Offload some of the client processing back to the server if it is really a concern. This is a scenario that is counter to what most of us are taught to do, but it may be the right thing to do in this case if there are aspects of the client experience that would allow and be improved by doing this.

Perhaps the client does a lot of data manipulation or sorting that doesnt require round-tripping to process. That might be a candidate area to pull back to the server if you want to optimize utilization and feel you can handle a greater workload on the server without noticible consequence.

share|improve this answer

The broad advice: In your situation, you can't get the system much faster (if at all) because the system will have more than enough RAM to cache everything and will do this where necessary.

share|improve this answer

To make server faster doesn't make sense by its own. If you mean visitor's experience to get faster, I would say: assuming that you make your OS 100% efficient, your network link would be bottleneck and not faster than server. So, go and get more customers to be hosted on this server!

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.