Utility (Windows) to make the CPU affinity permanent

Discussion in 'Operating Systems' started by mbk1969, Mar 22, 2014.

  1. mbk1969

    mbk1969 Ancient Guru

    Messages:
    10,463
    Likes Received:
    7,611
    GPU:
    GF RTX 2070 Super
    Last edited: Mar 22, 2014
  2. Watcher

    Watcher Ancient Guru

    Messages:
    2,592
    Likes Received:
    234
    GPU:
    Gigabyte Windforce R9 380
    Here are a couple of free utilities that will set the CPU affinity and priority of any executable x86 or x64 whenever the process is launched.

    These programs run in the system tray waiting for the process to be launched and then sets CPU affinity and priority of that executable.

    Bill2's Process Manager

    http://www.bill2-software.com/processmanager/

    http://www.softpedia.com/get/System/System-Info/Bill2-s-Process-Manager.shtml

    System Explorer

    http://systemexplorer.net/

    http://www.softpedia.com/get/System/System-Info/System-Explorer.shtml
     
    Last edited: Mar 22, 2014
  3. WhiteLightning

    WhiteLightning Don Illuminati Staff Member

    Messages:
    28,805
    Likes Received:
    1,652
    GPU:
    GTX1070 iChillx4
  4. tappingbowl

    tappingbowl Master Guru

    Messages:
    209
    Likes Received:
    1
    GPU:
    Nvidia
    mbk1969, a shame! No one knows about your great tool!
     

  5. mbk1969

    mbk1969 Ancient Guru

    Messages:
    10,463
    Likes Received:
    7,611
    GPU:
    GF RTX 2070 Super
    Due to fact that PPF`s thread is hovering on first page (thanks to your activity) and having more than 4k views I think gurus just do not consider it great.
     
  6. -Tj-

    -Tj- Ancient Guru

    Messages:
    17,139
    Likes Received:
    1,906
    GPU:
    Zotac GTX980Ti OC
    I think its because its more advanced, almost confusing if you don't really understand CMD and all those commands.

    I tweak my OS a lot and im not really comfortable doing all that like mentioned in your first post, process lasso etc seems more hassle free :nerd:
     
  7. mbk1969

    mbk1969 Ancient Guru

    Messages:
    10,463
    Likes Received:
    7,611
    GPU:
    GF RTX 2070 Super
    Hence no great.
    Comparing to tools written on C/C++ this PPF project has advantages: (1) .Net code can be more efficient because it is optimized by .Net just-in-time compiler right at execution on user`s machine (not on developer`s machine); (2) it is completely open.
    And for me this project was fun.
     
  8. tappingbowl

    tappingbowl Master Guru

    Messages:
    209
    Likes Received:
    1
    GPU:
    Nvidia
    You say "was"? It is no fun anymore? No more plugins? :cry:
     
  9. mbk1969

    mbk1969 Ancient Guru

    Messages:
    10,463
    Likes Received:
    7,611
    GPU:
    GF RTX 2070 Super
    Project is in stable state now. I see no other Win32 API functions to offer. If user will demand any features I will try to implement them.
    As for CPU affinity for threads - I still reckon it useless and theoretically unfounded. Threads can change their workload many times, so it is possible to cripple thread scheduling.
     
  10. tappingbowl

    tappingbowl Master Guru

    Messages:
    209
    Likes Received:
    1
    GPU:
    Nvidia
    Yeah, it is pretty stable now (had no issues so far). Thank you for your work.
    Okay. Well, if you would find a more conservative behavior more founded... to separate at least some highest workload that is running like constantly and with a high CPU cycles. I would try to use such plugin as well.
    That is how it is supposed to work:

    1 - PPF checks available cores.
    2 - PPF monitors for threads with a highest workload and running time.
    3 - PPF checks if these threads are on the same core.
    4 - If two(or more) threads with a highest workload and running time are found on the same core - go to 5, else go to 7.
    5 - PPF: Checking if setting this affinity will not "conflict" with a possible another "high workload" thread running on another available core. If it will conflict - go to 7.
    6 - Set affinity for a thread with less workload and running time. (picks from found threads that are considered "high workload", "constant running")
    7 - Stop monitoring.

    Example:
    1 - PPF: 2 cores available. (PPF starting to search for a two threads with "highest workload" and "high running time" and that are on the same core)
    2 - PPF: Listed all threads with highest workload and running time.
    3 - PPF: From the list above it is confirmed that 3 threads are on the same core.
    4 - PPF: Of these 3 confirmed threads - found the one with a highest workload - leave it and go to the next thread. Thread that is right after this one by workload level.
    5 - PPF: "Affinity conflict prediction" is done. Thread will not conflict with another threads (It means that a highest workload thread that is running on the second core - is lower than a highest workload thread that is running on the first core).
    6 - PPF: Affinity for a found thread is set to the second available core.
    7 - PPF: Monitoring stopped.

    Result: We had 3 threads with a high workload running on the same core. Now there are only two threads running there.
    And i had an idea about what -Tj- mentioned. I am able to understand how to configure all this stuff but some people would consider it a bit of a "hassle". Thought about something like a simple gui to ask people about executable.
    For example:

    Game is launched PPF asked: "Would you like to make it configured?". And answers are: "Yes" / "No" / "Advanced". "Advanced" - could have some plugins in list like "replacethreadspriority", "replacethreadsaffinity". There could be a few configurations in .ini. Watch only for games (don't know how to compare it, maybe windows through windows game explorer?) or watch for all processes, except Microsoft ones. Or watch for a whole processes on a system. When PPF encounters a newly registered process and user has been asked and answered to PPF with his decision about certain process - PPF writes it to his .ini.
    For example:
    - process notepad has been launched.
    - user asked.
    - user answered: "ignore".
    - PPF wrote it to "ignore section" in .ini.
    - PPF does not asks about 'notepad' anymore. (if user is willing to remove them, just open an .ini with ignored processes and delete 'notepad')

    Or PPF could have a small icon in the notification area. User press it, options are: Exit / Edit ignore list / add application.
    Or PPF could work in an automatic way. No user interaction is needed. In this mode it will configure only games. And will use only plugins like "maximumtimerresolutionuntilexit", "priorityabovenormal" and "iopriority(3)".

    There could be 'Automatic', 'Semi-Automatic', 'Manual' and 'Advanced Manual' modes.
    'Advanced Manual' - is what it is now.
    'Manual' - using gui and question user which plugins will be configured. Ignoring system processes.
    'Semi-Automatic' - only "safe" plugins will be configured automatically. Ignoring system processes.
    'Automatic' - only "safe" plugins will be configured automatically and for games only. Without any user interaction. Ignoring system processes as well.

    For a better user understanding PPF could lead in question a name of an 'exe' and it's description.
    Well, i am aware that both of these implementations - will be pretty complex stuff. Not even sure a which one. Highly possible these ideas are unfounded as well.
     
    Last edited: Mar 24, 2014

  11. mbk1969

    mbk1969 Ancient Guru

    Messages:
    10,463
    Likes Received:
    7,611
    GPU:
    GF RTX 2070 Super
    tappingbowl, I answered in PPF`s thread.
     

Share This Page