Put Magento's var directory in RAM

I need to speed up my magento installation, so I'm planning to put the content of 'var/' (or only var/cache and var/sessions) on a tmpfs.

I'm also buying a reserved instance on Amazon, so I would like to keep a sufficent amount of RAM. I want to enable memcached, PHP Apc, MySQL caching and HTTP caching.

I'm thinking of a Medium Reserved Instance with the following specs:

3.75 GB memory
2 EC2 Compute Unit (1 virtual core with 2 EC2 Compute Unit)
410 GB instance storage
32-bit or 64-bit platform
I/O Performance: Moderate
EBS-Optimized Available: No
API name: m1.medium

Will the RAM be enough to appy a good caching system? Looking now (after 3 months) the var directory is 14gb, but I think cleaning it up each 5/7 days would be good too.

Do you have any suggestion for me?

P.S. the store will contain an average of 100/150 products.

Answers


I would suggest looking into setting up a reverse proxy like Varnish.

If you do plan on just using a tmpfs in memory I would suggest looking into Colin's improved over Zend_Cache_Backend_File

Also I would suggest looking into mytop to keep tabs of if you have any places you can optimize queries in the application itself or in my.cnf to help ease any DB bottlenecks.

Session Digital has a good white paper (although somewhat dated) on optimizing Magento enterprise and the same can be applied to Community. Out of everything I've tried, Varnish, as mentioned in the White paper offered the most significant increase in response time.

Hope this helps!


I think moving /var to a tmpfs is probably not your biggest bottleneck and would likely be more trouble than its worth. Make sure Magento caching is enabled and you have APC enabled.

This post covers some general tips on increasing Magento performance:

Why is Magento so slow?


Need Your Help

Can't find free handle when using mysql via matlab

mysql matlab

I'm accessing a mysql database via matlab on a fedora13 box.

VBA Copy and Paste Method Not Working

excel vba excel-vba clipboard copy-paste

I am trying to write a simple copy and paste macro and it works up until the last line. When it hits the last line, it says the paste function will not work. I am really confused why this is happ...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.