  We present the design of a high repetition rate MeV energy ultrafast electron
diffraction instrument based on a DC photoelectron gun and an SRF linac with
multiple independently controlled accelerating and bunching cavities. The
design is based on the existing Cornell photoinjector, which can readily be
applied to the presented findings. Using particle tracking simulations in
conjunction with multiobjective genetic algorithm optimization, we explore the
smallest bunch lengths, emittance, and probe spot sizes achievable. We present
results for both stroboscopic conditions (with single electrons per pulse) and
with $10^5$ electrons/bunch which may be suitable for single-shot diffraction
images. In the stroboscopic case, the flexibility provided by the many-cavity
bunching and acceleration allows for longitudinal phase space linearization
without a higher harmonic field, providing sub-fs bunch lengths at the sample.
Given low emittance photoemission conditions, these small bunch lengths can be
maintained with probe transverse sizes at the single micron scale and below. In
the case of $10^5$ electrons per pulse, we simulate state-of the art 5D
brightness conditions: rms bunch lengths of 10 fs with 3 nm normalized
emittances, while now permitting repetition rates as high as 1.3 GHz. Finally,
to aid in the design of new SRF-based UED machines, we simulate the trade-off
between the number of cavities used and achievable bunch length and emittance.
