Number Partitioning targeting a Ratio of subset sums? I have a problem, which appears to be similar to number partitioning:
a set of numbers partitioned (two-way), such that the sum of the numbers in each subset are as close as possible to a targeted ratio (instead of having the minimum difference, as in the number partitioning problem). Can I use the same algorithms? How would I modify them? Is another approach more suitable?

Context:

I am implementing a load-balancing algorithm, for a work conserving Group Weighted Round Robin (GWRR) scheduler. In some corner-case (some groups have less tasks than CPUs in the system), I want to partition the weighted groups and assign them to the subsets of a partitioning of the set of CPUs, so that the ratio of the sums of (predicted) CPU idle times, in the subsets of the CPU partition, is as close as possible to the ratio of the weight sums, in the subsets of the group partition. The group partition splits the groups, using a normal number partitioning algorithm (CKK), so that group weight sums, in each subset, have the minimum possible difference (but they are unlikely to match, in the general case).

Any ideas?
Yes.  Suppose the numbers are $x_1,\dots,x_n$ and the target ratio is $r$.  Define

$$y=\left\lfloor {1-r \over 1+r} \times (x_1 + \dots + x_n) \right\rceil,$$

and then look for the partition of $x_1,\dots,x_n,y$ that has minimum difference.  I suspect this might be either the solution to your original problem, or very close to it.

Why?  A partition of $x_1,\dots,x_n$ with exactly the ratio $r$ will have one group whose total is $c (x_1+ \dots + x_n)$ and another whose total is $cr(x_1+\dots+x_n)$.  These two must sum to $x_1+\dots+x_n$, so we find that $c+cr=1$, i.e., $c=1/(1+r)$, so their difference is

$$c(x_1+\dots+x_n) - cr(x_1+\dots+x_n) = {1-r \over 1+r} (x_1+\dots+x_n).$$

We have defined $y$ to be this difference, rounded to the nearest integer.  So, if you add $y$ to the smaller group, you get a perfect partition of $x_1,\dots,x_n,y$ with difference zero.  And the converse is true as well.