The undulator beamline at the storage ring PETRA of the Hamburger Synchrotronstrahlungslabor HASYLAB delivers hard x-ray photons usable up to 300 keV. The total power of the beam is now up to 7.5 kW with closed gap and 60 mA stored particle beam. After a planned upgrade of the undulator, the power can increase to about 15 kW. The vertical white beam slit for the PETRA undulator beamline is located at about 105 m from the source. The worst case for the slit is when all the power is absorbed in one pert of the slit system, which he slits must survive. The paper presents the results from parameter optimization in the worst case. The goal of the optimization is to minimize the maximum temperature of the slits. The geometrical parameters are the cooling hole size, its location from the surface, and the distance between holes. the worst case is found by moving the x-ray beam to all the possible locations. The maximum temperature of an optimized slit that has a two degree angle with the beam is about 192 degrees C. The corresponding thermal stress in the slit is very low. The analysis assumptions, modeling, results, discussion, and conclusion will be given in the paper.