# Big matrix multiplication on single machine

For example I have 2 matrices that can't fit in RAM. I need algorithm or library which can handle this.Preferably Matlab or Python.

I think it can be some block matrix multiplication? Also I think there is an analogy hard drive<->ram, gpu ram<->cpu ram, cpu ram<->cpu cache, so we can take some cpu cache optimized techniques?

It seems in python I can use numpy.memmap but I don't understand memory consumption of this approach and maybe it isn't optimal solution at all.

I think you should have a look at PyTables. Especially the tutorial given at PyData 2012. PyTables combines hierarchical datasets with a computational engine. It uses the Blosc compresser to avoid I/O bottlenecks and an optimized evaluator for expressions tables.Expr (based on Numexpr).