One last thing: If your Matlab code runs successfully now, with only 256GB of SWAP, then it is likely using your hard drive for temporary storage. If that is the case, then you have another performance knob to tweak: Your disk storage. It then makes sense to spend some, perhaps most, of your budget moving your data to SSD. Perhaps you could add a second Samsung 830 swap drive and also move your data to an SSD RAID?I already have a Samsung 830 256GB which is the only swap. At the moment it's too little and too slow, which is whay I need more swap space and also faster swap.