While many research works have focused on improving TCP performance in ad hoc networks, little attention has been paid to UDP performance degradation. In this letter, a theory model is proposed, which is capable of formally explaining the UDP performance in ad hoc networks. With this model, it shows that to optimize UDP packet size is a multiple-object optimum problem in ad hoc networks and that system performance depends on communication hops, route stability and the traffic load. At last, a simplified model is used for simulation, and the results show that there exists a loose optimum range when the hop count and nodes' mobility are pre-known.