Look in the launcher, there should be an option to adjust the ram without messing with java arguments.
What version of windows are you running? Skyfactory 3 should be fine with only 2gigs of ram allocated to it, but you can bump it up a bit more, but leave at least 4gigs for your system to...