BOINC is a middleware for Volunteer Computing. In BOINC projects, heterogeneous resources distributed across the Internet are used for large-scale scientific simulations. The large need for resources in BOINC projects often competes with volunteer preferences: volunteers can impose limits on the use of their idle resources. Most of the time, maximum project performance can be achieved only when volunteer preferences are neglected. To address this problem, we propose a novel optimization procedure based on constraint optimization techniques that actively allocates volunteer resources to improve project throughput and, at the same time, aims to preserve volunteer preferences. We evaluate our approach against the current allocation strategies of BOINC using EmBOINC, a full-scale emulator of BOINC projects using realistic trace populations of volunteer clients (including heterogeneity, availability, reliability). We show the increase in project throughput obtained with our approach and di...