Most probably, there are too many labels for 8 GB for the same amount of space. If you have 8 GB, then there will be twice as much labels as for 4 GB in the same visible space. You have to change the number of labels depending on the amount of memory.
You can use a fixed number of labels, 10 for example, and calculate the scale dynamically depending on how much memory is available.