Most modern packs (1.12) need about 6GB allocated, but that only leaves 2GB for all the important system functions like the OS and Java to run. My desktop has 16GB and I allocate between 6 and 7GB to run at 120FPS+... I also have a video card that supplies it's own 6GB ram.
If you do not have a GPU card with it's own memory then you can kiss a good chunk of that 2GB goodbye for use as video ram (My laptop has 8GB, the Vega graphics built into the CPU can steal up to half of installed ram; 4GB in my case, 8GB with a full 16GB installed.
Set your allocation to 6GB and see how things run. If things seem slow try 5GB. Software lag is better than delays caused by relying on disk swapping to fake having ram.