Purpose/objectives: Intrafraction tumor motion during external radiotherapy is a challenge for the treatment accuracy. A novel technique to mitigate the impact of tumor motion is real-time adaptation of the multileaf collimator (MLC) aperture to the motion, also known as MLC tracking. Although MLC tracking improves the dosimetric accuracy, there are still residual errors. Here, we investigate and rank the performance of five prediction algorithms and seven improvements of an MLC tracking system by extensive tracking treatment simulations. Materials and Methods: An in-house–developed MLC tracking simulator that has been experimentally validated against an electromagnetic-guided MLC tracking system was used to test the prediction algorithms and tracking system improvements. The simulator requires a Dicom treatment plan and a motion trajectory as input and outputs all motion of the accelerator during MLC tracking treatment delivery. For lung tumors, MLC tracking treatments were simulated with a low and a high modulation VMAT plan using 99 patient-measured lung tumor trajectories. For prostate, tracking was also simulated with a low and a high modulation VMAT plan, but with 695 prostate trajectories. For each simulated treatment, the tracking error was quantified as the mean MLC exposure error, which is the sum of the overexposed area (irradiated area that should have been shielded according to the treatment plan) and the underexposed area (shielded area that should have been irradiated). First, MLC tracking was simulated with the current MLC tracking system without prediction, with perfect prediction (Perfect), and with the following five prediction algorithms: linear Kalman filter (Kalman), kernel density estimation (KDE), linear adaptive filtering (LAF), wavelet-based multiscale autoregression (wLMS), and time variant seasonal autoregression (TVSAR). Next, MLC tracking was simulated using the best prediction algorithm and seven different tracking system improvements: no localization signal latency (a), doubled maximum MLC leaf speed (b), halved MLC leaf width (c), use of Y backup jaws to track motion perpendicular to the MLC leaves (d), dynamic collimator rotation for alignment of the MLC leaves with the dominant target motion direction (e), improvements 4 and 5 combined (f), and all improvements combined (g). Results: All results are presented as the mean residual MLC exposure error compared to no tracking. In the prediction study, the residual MLC exposure error was 47.0% (no prediction), 45.1% (Kalman), 43.8% (KDE), 43.7% (LAF), 42.1% (wLMS), 40.1% (TVSAR), and 36.5% (Perfect) for lung MLC tracking. For prostate MLC tracking, it was 66.0% (no prediction), 66.9% (Kalman), and 63.4% (Perfect). For lung with TVSAR prediction, the residual MLC exposure error for the seven tracking system improvements was 37.2%(1), 38.3%(2), 37.4%(3), 34.2%(4), 30.6%(5), 27.7%(6), and 20.7%(7). For prostate with no prediction, the residual MLC exposure error was 61.7%(1), 61.4%(2), 55.4%(3), 57.2%(4), 47.5%(5), 43.7%(6), and 38.7%(7). Conclusion: For prostate, MLC tracking was slightly better without prediction than with linear Kalman filter prediction. For lung, the TVSAR prediction algorithm performed best. Dynamic alignment of the collimator with the dominant motion axis was the most efficient MLC tracking improvement except for lung tracking with the low modulation VMAT plan, where jaw tracking was slightly better.