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
Setting all processes per box to a certain core #3276
Comments
If I use 0x00000001, the processes get bound to core 0, so that I can confirm that it works. Apparently I don't understand how the bitmask works. Neither 0x00000010 (which I assumed to be core 1, as it would be two bits), nor 0x00000100 (which was expected to be 4 in binary) changed it to some other core, all cores were set to be used. (My system has 4 cores (0-3)). |
this is not binary its hex |
In the meantime, after looking up bitmask, which I did before I replied to this, stating that I fail to understand it, I tried 0x00000002, and it worked, as it, like you said, is not in binary. (Should be called hexmask, :) as the term bitmask made me believe it needed binary input) |
You can write it in binary and then convert it to hex.
For 4 cores: BIN: 1001 (CPU3 On, CPU2 to CPU1 Off, CPU0 On) ==> HEX: 0x00000009 For 12 cores: BIN: 1000 0000 0001 (CPU11 On, CPU2 to CPU10 Off, CPU0 On) ==> HEX: 0x00000801 sbie3276.mp4 |
A bit off-topic, but for better isolation make sure to either disable HyperThreading in BIOS or use only odd core numbers for Intel CPU's and only even core numbers for AMD CPU's if you want to avoid using fake cores for sandboxes while keeping HyperThreading enabled. |
Is your feature request related to a problem or use case?
The use case is to separate processes per sandbox to individual cores, without doing that manually.
So that one can set sandbox A to have all its processes use core 0, while sandbox B is set to have all its processes will be set to core 1 (or any other than 0).
Simply to isolate processes with the help of hardware features.
Describe the solution you'd like
If someone has special needs to set those processes on different cores per box, they might have to use a taskmanager, since that appears to be overkill for Sandboxie (out of the scope, as far as I am concerned). Having a setting that "forces" processes of a certain sandbox to use a specific core.
I don't know how Sandboxie handles the creation of processes, but it could check for a setting in the ini and set the processes CPU affinity to that accordingly.
Describe alternatives you've considered
I am not sure, if that can be done via a script or something like that, to cover all the processes that get created.
The text was updated successfully, but these errors were encountered: