There's no combination of free codecs and media player I have ever found that are able to play mkv files on slow CPUs other than CoreAVC with deblocking set to always skip. This codec is so much faster and more efficient than any of the K-Lite or CCCP codecs in my experience. Don't even think about VLC, that's just a brute force video player that plays everything at a cost - it's cobbled together and is slow.
http://corecodec.com/products/coreavc Unfortunately, it's not readily available for free but I'm sure you can find it if you look.
With this codec and media player classic or home cinema, I am able to watch 720p mkv files on an ASUS first gen EeePC netbook from 2007 with 512MB of ram and Celeron-M CPU at 900MHz.
You don't really need optimization to watch movies unless you have too many active processes in the background taking away your CPU clock cycles. RAM is not going to do anything unless, again you have too many background processes consuming memory and therefore paging to the hard disk, it's raw CPU power that you need.