A tailored optimization of perovskite solar cells requires a detailed understanding of the processes limiting the device efficiency. Here, we study the role of the hole transport layer (HTL) spiro-MeOTAD and its thickness in a mesoscopic TiO2-based solar cell architecture. We find that a sufficiently thick (200 nm) HTL not only increases the charge carrier collection efficiency but also the light harvesting efficiency. This is due to an enhanced reflection of a smooth HTL/Au-electrode interface. The rough CH3NH3PbI3 perovskite surface requires an HTL thickness of >400 nm to avoid surface recombination and guarantee a high open-circuit voltage. Analyses of the electroluminescence efficiency and the diode ideality factor show that the open-circuit voltage becomes completely limited by trap-assisted recombination in the perovskite for a thick HTL. Thus, spiro-MeOTAD is a very good HTL choice from the device physics' point of view. The fill factor analyzed by the Suns-Voc method is not transport limited, but trap-recombination limited as well. Consequently, a further optimization of the device has to focus on defects in the polycrystalline perovskite film.