Using a compressor effectively is as much an art as a science. Selecting the optimum threshold and compression settings are a judgement call based on experience and the desired effect - or put another way - guessing. The RMS value will always be less than the peak value (except for square waves where the peak and RMS values are equal) so it is usually close enough to ‘guess’ a bit below the peak value. The RMS value of a sine wave is approximately 0.707 times the peak value (a bit less than 3/4).
To actually measure the RMS values you could try the experimental “Wave Stats” plug-in from this page https://forum.audacityteam.org/t/wave-stats-plug-in/15515/1
As the author of that plug-in I would welcome your feedback/comments.