For VM and the smp I recommend at least 1.5gig per instance which will leave at least 1 gig for the client to use which should prevent running out of ram.