Decrease that to 4. Never give minecraft more than 4 GB.
I have an almost identical PC build as you, use a resource pack, use 4GB and have no lag spikes at all. Though on my older PC I did have the issue you describe, so I know what you are dealing with...