-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scale itp calculation based on total throughput of user #1831
base: master
Are you sure you want to change the base?
Conversation
This distributes the number of cores more fairly between users, and allows for an effective way to transfer/split TP between runs. (See official-stockfish#1747 (comment))
don't quite agree with this. A user that has 6 successful LTC tests running should be getting more resources, in the interest of the project. The goal is not divide resources as evenly as possible, but such that SF progress is fastest. |
I disagree with this - if this was the case we should not have introduced #1747 at all and stick to LLR and TC-based distribution only. And comparing this PR to current master, there is in fact an advantage - current master encourages users to only submit a few tests, and concentrate resources on these few tests only. But many times the user doesn't know which tests will succeed, so is inclined to first submit a number of variations, let them run for a bit, then choose the best variation and possibly improve on it. Each test, then, can be set to eg. 50% TP. Let's say we have 5 STCs each at 100TP: Currently each test will get This PR benefits this type of users without impacting the others - eg. for the example you gave, if the user has 6 LTC tests running at high LR, the same number of cores would still be given compared to master. |
I think what Vondele wants to say is that since you reduce based on total itp, a user with many LTC's will get fewer resources (since they have higher itp). |
Also another case would be odd with this patch: The main problem is the new quadratic count formula which decreases total itp for more then 6 tests. We should fix the total itp for count >= 6 at the maximum at count=6 and simply divide by count. Then par example if you have 6 tests running and add 6 more the have the same number of cores (as at count=6) but each single test have half the speed as @XInTheDark wants. And this has the advantage that you doesn't have to fiddle with the TP of the tests because it simple works automatically. I think this code can do it (untested):
|
Sorry, wrong account again. I have to look if i can open links from an external application like discord in firefox in the correct container (i have different one for personal use and business). |
Damn again. But i have no found how you can setup this. But my problem this reacts only to the hostname and i need to differentiate between my private and business repos at github and that seems not to work. |
Using TP would solve this problem I think? I realise that the calculation here does not really require itp since it's only a multiplier for the original itp. |
I agree with this, using a quadratic formula is weird IMO, as it instead decreases total itp when number of tests is large. This doesn't make sense - the most we should do is cap the total itp at 300, not decrease it beyond that. |
I think this works, updated! |
@XInTheDark |
To summarise with a few examples:
|
I don't think the problem occurs (refer to row 2 and 3 of the table above, the itp is indeed handled properly) |
@XInTheDark |
@locutus2 The specific problem observed with the simpler version is when there is a large number of tests, each with a low TP. For example 10x10% TP - master gives 2.65 itp per test, your version gives 5% , and this PR version gives 9.7%. |
@XInTheDark Question: |
@locutus2 In the scenario that you mentioned, the 50% test will still have half the TP of the 100% test. The multiplier is based on total TP, so it’s the same multiplier for all tests. |
In fact in this specific example, my PR gives 64/32 itp respectively, for a total of 288 itp. but your version gives just 50/25, for a total of 225 itp. Can be seen that this PR makes more sense in giving close to 300 itp. |
@XInTheDark Throughput like it currently used and expected should be a scaling factor for used cores for a The usage especially highlights the both cases 6x 100% vs 6x 50%: here the second group should have exactly half the cores then the first group because each test should use also half the cores. And this meaning should not be changed. But you need some other tweaking because your target is mainly to redistribute the cores between your tests but not changing the total core budget. For this a new parameters (say Weight = W) should be added as relative weight to each test (default could be 100 but this is abitrary). Then an additional modificator could be applied which correct the itp according to ratio of test weight and average test weight:
Then we can separately control the effects and don't mix it up:
|
The concept looks fine, but I think it's too complicated to have two parameters to calculate the TP. Also, I think the problem of not getting exactly half the cores at 50% TP is not really important - with this PR the number of total itp for the user stays around the same with a sufficiently large number of tests. i.e. as long as total TP remains the same total itp will remain the same. So TP in that case would be used to adjust the relative proportions ("weight" as mentioned in your message) of the itp of the respective tests. |
Scale itp calculation based on total throughput instead of active runs count.
This distributes the number of cores more fairly between users, and allows for an effective way to transfer/split TP between runs. (See #1747 (comment))
e.g. It makes sense that 2 STCs, each at 50% TP, is now considered equivalent to 1 at 100% TP.
Refer to the table here for some examples: #1831 (comment)