I looked at this independently in the perspective of fitting files onto a DVD. I ended up programmatically brute-forcing it (which takes a long time of course because it has to check all possible cases) but it ended up with the best results possible. Brute force might not be bad since you have only about 5 things, so that's only 5! (I think) cases to try.
Sure, algorithms like ordering the sizes or randomly placing things together would save time but there's no shortcut to the best result.
"The three principal virtues of a programmer are Laziness, Impatience, and Hubris. See the Camel Book for why." -- `man perl`