A key goal of molecular dynamics simulations in biology is the accurate and precise measurement of the rates and mechanisms of rare events, for example ligand binding/unbinding, or protein folding. A fundamental problem in the field lies in determining the best way to use finite computing resources to obtain this information. The framework of the weighted ensemble (WE) resampling procedure provides the ability to sample thousands of unbiased reactive trajectories spanning initial and final states of interest in simulation times on the scale of the event duration, which is typically exponentially shorter than the first-passage time. The WE resampling approach, although unbiased, comes with the cost that the variance can be large, limiting the value of computed quantities. Building on recent ideas regarding the sources of variance in a resampled trajectory ensemble [https://arxiv.org/abs/1806.00860], we implement an adaptive variance-minimization procedure that dynamically optimizes allocation of computing resources across the space. This procedure is based on leveraging a coarse-grained Markov model of the system which can be known a priori or created on the fly. The variance is (approximately) minimized at each intermediate step by estimating the optimal resource allocation defined by the coarse-grained model. We present results regarding the application of these methods to the folding of small proteins.