3

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!

2
  • 3
    Minecraft server?
    – Chopper3
    Oct 25, 2012 at 15:33
  • @Chopper3 game servers are a great idea!
    – deltree
    Oct 25, 2012 at 18:33

5 Answers 5

11

Let linux use it to cache files, which it will do automatically. This question talks about how to make Linux go at this harder: https://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.

1
  • That is actually a very good motto, think I will try to stick to it. Interesting link as well. Thanks!
    – Stgmk
    Oct 25, 2012 at 15:50
1

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.

1
  • 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, 2012 at 15:57
1

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.

0

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.

0

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!

Not the answer you're looking for? Browse other questions tagged .