Project Mercury - CPU Priority Booster for heavy multitaskers

Discussion in 'Operating Systems' started by SvenBent, Apr 10, 2015.

  1. primetime

    primetime [H]ardness Supreme

    Messages:
    5,480
    Joined:
    Aug 17, 2005
    fuck it...figured i give some feedback....ran svpmark with wps writer, mpc playing movie,chrome all minimized and got surprising results

    Mercury auto:
    [​IMG][/URL][/IMG]
    Mercury off:
    [​IMG]

    Hell it seems to work at least;)
    i have to assume it was on auto setting cause with win10 there's no way to change settings, and it not the first app i couldn't change settings while in system tray, so its not really the apps fault.

    edit: ill have to try running 3dmark or something while encoding bluerays to dvd5 and see how that does
     
    Last edited: May 16, 2015
  2. SvenBent

    SvenBent 2[H]4U

    Messages:
    2,657
    Joined:
    Sep 13, 2008
    Sorry idont have win10 i might install it on my laptop for dualboot to run experiments.
    under normal win7 conditions the programs does it magic as soon as it started. or more correctly after 3 secs. it wait 3 secs so if you have it auto-started it doesnt use cpu time while all the other programs are starting up.

    Thank you for the feed back. not any miracles there :)
    How high where you cpu utilization in for the background stuff ?

    -- edit--
    side not
    if you are using handbrake for the conversion my program can only do very little since handbrake as default already runs the encoding in "below normal" CPU priority
     
  3. SvenBent

    SvenBent 2[H]4U

    Messages:
    2,657
    Joined:
    Sep 13, 2008
    Just bumping because this weekend i have no long time duties to do. So I'm hoping to get some feedback or ideas form you guys that i can use to improve this.

    Here are some thing I'm tinkering with in my head ( better names probbaly needs to be found)

    FastReact
    Disabled windows animation/menu delays etc etc. to give a more responsive system.
    nothing more than a regeditry hack but i need to figure out how to make windows update it live ( no need for reboot)

    MegaBoost:
    When this is enabled you foreground application gets "High" priority.
    I'm torn about this as "High priority" can make you game conflict/fight with the networks drive for CPU resource and might introduce network lag. might end up beeing more dementrial for most people

    Gentle memory cleaning:
    Only make the few hig memmory using programs swap out thier memory.
    again torn as i don't really like memory cleaning features. its mostly snake oil. and i dont want to add in coding and increase memory footprint for snake oil.

    Excessive mode
    Will look for non foreground applications with high CPU usage (80%+) and give then "Below normal" CPU priority. Im a bit worried about cpu usage while doing these kinds of scans as i don't want to introduce microstutter on the foregrounds application/game.
    This is how Process lasso works. and its giving me a bit of a challange to implant

    Child Awareness
    This mode/features will boost child process from you foreground application as well. it will only work for known programs that has this behavier. e.g. like firefox
    With this enabled having firefox as foreground application would also increase CPU priority for flash player. i came up with this idea as I saw youtube player struggling while I was doing some CPU heavy compression.
    This will be unneeded if I can get excessive mode to work though, and is mostly a patchwork solutions for specific cases



    TLDR: Give me some good suggestion i can tinker on this weekend please :)
     
  4. Cerulean

    Cerulean [H]ardForum Junkie

    Messages:
    9,244
    Joined:
    Jul 27, 2006
    New link please! I want to download Mercury. It would help me with an Excel workbook that has over 420,000 lines. :)
     
  5. Tawnos

    Tawnos 2[H]4U

    Messages:
    3,806
    Joined:
    Sep 9, 2001
    Beyond just CPU priority, have you considered I/O priority? I've found on my spinning disk systems that assigning below normal I/O priority to some tasks greatly improves my perceived performance. I don't know how it would affect benchmark perf, but it might be worth checking looking into.
     
  6. SvenBent

    SvenBent 2[H]4U

    Messages:
    2,657
    Joined:
    Sep 13, 2008
    @ cerulean
    Here ya go
    http://www.techcenter.dk/Mercury.exe
    Finally i got my domain Fixed


    @ Tawnos
    I haven't giving it a though, but it's obviously an interesting idea. I will look into it. Thank you
     
  7. Cerulean

    Cerulean [H]ardForum Junkie

    Messages:
    9,244
    Joined:
    Jul 27, 2006
    Earlier this week a thought I had was for the ability to sick Mercury on (1) a very specific PID, (2) multiple specific PIDs only, (3) multiple specific PDIs only but prioritizing on the one with the greatest demands, (4) normal Mercury operation but applying only to any process that has a matching keyword from a list (perhaps I want Mercury to apply to only processes of a specific name rather than PID, that way it doesn't accidentally boost priority on a task that might come up -- ex I am multitasking by browsing the internet while process X is doing its thing).
     
  8. Spidey329

    Spidey329 [H]ardForum Junkie

    Messages:
    8,698
    Joined:
    Dec 15, 2003
    Anyone try this on a Surface Pro? Seems like it might help squeeze a little power / battery out of it. If Microsoft doesn't do this already for those, I can't remember.
    To update those settings live, you should be able to reload explorer.exe. I'm sure there's probably a command to do it without that, but that's the quick and dirty way to force a lot of reg changes.


    It's a good concept. Reminds me of the governors on Android which dictate what gets priority. It's something that should really be built into the OS, but they don't. I used to do it manually when doing CPU intensive stuff like 3d rendering or encoding.
     
    Last edited: Jul 17, 2015
  9. SvenBent

    SvenBent 2[H]4U

    Messages:
    2,657
    Joined:
    Sep 13, 2008
    I;m finally having excessive mode in a somehow running way in its own little utility.
    It will find any running process that takes more than 90% of the CPU time and adjsut it to bee less of a CPU time stealer.
    However im in doubt of which method to use here

    Lower priorty to below normal
    Pro: You system will be running at full utilization since all cores are still available for all processes
    Con: might not really do that big of a difference since active program has incresed priority anyway

    Remove access to a core
    Pro: This will make sure that any active program/games has at least one core for itself, that any background task cant "steal".
    Con: if your active program is CPU light (web browsing), you are not utilization the full CPU as the reserved core would not really do any work.
     
  10. gamerk2

    gamerk2 [H]ard|Gawd

    Messages:
    1,529
    Joined:
    Jul 9, 2012
    Be careful with those types of assumptions, since you also need to consider Joypad/Gamepad supported titles. It might be simpler just to check for a screensaver/low power mode instead.

    While forcing the program on one thread makes sense, you might want to make this configurable via either .ini or registry, since I could forsee some performance loss if a CPU heavy thread on core 0 and Mercury fight for time, especially if data needs to be loaded from the CPU cache every time they get swapped.
     
  11. SvenBent

    SvenBent 2[H]4U

    Messages:
    2,657
    Joined:
    Sep 13, 2008
    Point 1:
    You are correct. My explanation was not technical correct. i check with windows "idle time" timer the same timer windows use to activate low power mode and screensavers. so unless windows does not take joy/gamepads into account my program should be fine. But i will test this just to be sure. i never liked to play with joypad but luckily my wife can only play that way, so i have easy access to test it :)

    Point 2:
    I'm not sure i understand your point.
    This features is on on/off toggle in the systray icon menu. And its only the active program that gets moved to core 0 aka the game that has multicore stutter issues. So backgrounds programs are free to roam around on all cores.
    The only way i can foresee this cause cache thrashing, is when it gets move to core0 because it might be running on a randome core before it gets activated, but that should be only happen once ,unless you alt-tab out of the game and back in which it will do it once more.
    Compared to windows constant swapping threads around on cores, cache trashing should be minimized on the active program.
    Mercury does not run on a specific core btw.
    Did i understand your point correctly ?
     
    Last edited: Oct 6, 2015
  12. Danith

    Danith 2[H]4U

    Messages:
    2,625
    Joined:
    Oct 13, 2004
    Went to try this out for my slow work laptop and Symantec thinks it's suspicious file. Also ran it through Virustotal and it says Avira thinks your site is a Malware site, fyi

    edit: guessing this was compiled for 64bit? Damn, I really need to get my work laptop reimaged with 64bit
     
  13. SvenBent

    SvenBent 2[H]4U

    Messages:
    2,657
    Joined:
    Sep 13, 2008
    @Danith. Ty fo the info the oroblem lie with internal compression (like UPX) Since itcan potentiality ake it harder forAVenginesto detect malare Laz AVprogramers just mark the file suspecious assoon as they enconter nternal compression, instead of creating a propper decompress an then scan routine.
    This will be the 4th tmie im contactin avira around this issue. Can you give me theversion of norton you are using so i can get them to fix their scan engine too

    And yes it is64bit compiled.
    64 bit is aprox. 15% faster codeexecution so it has less cpu usage.
    Alos 64 bt code is more secure as NX bit is enabled for all 64 bit software .

    I can compilea 32bit version ifyou need.
     
  14. x509

    x509 [H]ard|Gawd

    Messages:
    1,625
    Joined:
    Sep 20, 2009
    Would appreciate it if you can run this message through a spellchecker.;)
     
  15. gamerk2

    gamerk2 [H]ard|Gawd

    Messages:
    1,529
    Joined:
    Jul 9, 2012
    Ok, that makes sense then.

    Ok, that makes a bit more sense then.

    Kinda goes to show though, MSFT does a decent enough job with their thread scheduler, but it would be nice if MSFT would try and come up with some way to take thread workload into account, to try an prevent the bumping of high workload threads at all. Especially on systems with more then two cores.
     
  16. diggi

    diggi [H]Lite

    Messages:
    109
    Joined:
    Oct 3, 2012
    I'll try it out, can you use it with process lasso ?
     
  17. Nenu

    Nenu [H]ardened

    Messages:
    18,457
    Joined:
    Apr 28, 2007
    It shouldnt be used with other software that does the same job, they could fight each other and you wouldnt have a guaranteed result.
    Either that or one of them would be redundant.
     
  18. SvenBent

    SvenBent 2[H]4U

    Messages:
    2,657
    Joined:
    Sep 13, 2008
    @diggi i dont see any immediately danger by combining those to but. but as Nenu said i would no recommends it in general.

    Project mercury increase your active application. and process lasso i believe lowers you backgrounds applications once they hit a certain CPU threshold

    in most of the cases there will be no different as having above vs normal is the same as above vs below. You don't get a even higher share of the cake from being two levels higher in priority than you do with one. Which is also why i have no impleanted the options to se active programs to high or Realtime. ( also high and real-time can give mouse/kb lag and freeze like states).

    Its basically two way to archive the same. however there are two situations each have a advantage

    1 -background music:
    if you are running background music like Pandora from you web browser and you start compression with 7-zip ( highly CPU heavy and multihtreaded.
    Project mercury will give 7-zip increased priority and the music will lag (Some music players will play fine due to them auto-setting themselves to above priority. e.g. winamp)
    Process lasso will not make a change since no background task is using high CPU resource.
    In this case process lasso has the better results. until you just minimize or leave the 7-zip compression window.

    2-Multiple heavy CPU processes:
    In this case you have at least a dozen heavy CPU process running in the background and start your favorite game:
    Project Mercury will adjust you game to Above Normal CPU priority. you game will receive and increased amount of CPU resources and better FPS.
    Process lasso will not do anything since no background task has a high enough CPU utilization (They are all below 33% on a quadcore)

    So even though they work almost the same there are some specific situations they react differently.


    and this gave me an idea for a setting to only boost games aka full screen applications :)
     
  19. SvenBent

    SvenBent 2[H]4U

    Messages:
    2,657
    Joined:
    Sep 13, 2008
    A quick discovery. in regards to windows10
    If you run applications in administrator mode, Project mercury cannot adjust its priority. To fix this start Project Mercury in administrator mode as well.
     
  20. Cerulean

    Cerulean [H]ardForum Junkie

    Messages:
    9,244
    Joined:
    Jul 27, 2006
    Replying to show continued support. I'm subscribed to this thread and check it every time it gets an update. Just want you to know, SvenBent. :)
     
  21. Cerulean

    Cerulean [H]ardForum Junkie

    Messages:
    9,244
    Joined:
    Jul 27, 2006
    Mercury download link is broken. I should host a copy of it on my site. =(
     
  22. SvenBent

    SvenBent 2[H]4U

    Messages:
    2,657
    Joined:
    Sep 13, 2008
    I'll fix the server tonight.
    Software is freely to be distributed in non modified form.
     
  23. SvenBent

    SvenBent 2[H]4U

    Messages:
    2,657
    Joined:
    Sep 13, 2008
    V 1.2.0.0 on the way

    This weekend v1.2.0.0. should hope fully be done.

    The main upgrade is in heavily reduced CPU usage when i monitor mode.
    Project Mercury already had lower CPU usage than both Process lasso and process tamer. but was slightly higher than TopWinPrio.
    The new version should reduce CPU usage from about 0.003-0.004% on a Core2Duo Q6600 to approximately 0% ( with a precision of 8 digits after the comma i was still unable to measure any CPU usage).
    So lesser CPU usage than any know "competitor"

    Next version also have improved response time to change priority.
    The old version had a worst case of up to ~500ms from switching program/window to priority adjustment started. The new version it should be reduced to near 0ms.
    For comparison TopWinPrio has ~ 2000ms worst case scenario and it can be lowered to ~1000ms worst case scenario.


    I've also done a bunch of benchmark on different machines between Project Mercuy, Process lasso and Process tamer.
    Both Process Lass and Process Tamer falls flat during heavy multitasking. Their default work method is inherently flawed as they look for a program that uses to much CPU. Rhats a SINGLE program that uses to much CPU. If you are running a multiple of CPU heavy programs they dont detect any bad programs and fails to resolve the stuttering and lag.
    More about it when the benchmarks get uploaded


    TLDR:
    New version on the way with reduced CPU usage and faster response time
     
  24. SvenBent

    SvenBent 2[H]4U

    Messages:
    2,657
    Joined:
    Sep 13, 2008
  25. Cerulean

    Cerulean [H]ardForum Junkie

    Messages:
    9,244
    Joined:
    Jul 27, 2006
    Some people will not be comfortable with Softpedia. In the past there has been adware/malware/spyware problems regarding Softpedia.

    On another note, this is one reason why checksum verification is important!

    I just downloaded Mercury.exe from Post #1 and got these checksums:

    MD5
    a899b7852974170a02ae1ba43101b5c3

    SHA1
    f60bf4ba0227b1ca6dcba1ee000c1fdc4fda3832

    CRC32
    4ad42a63

    Could you confirm that these are valid checksums of the latest binary?

    EDIT: Mirrored @

    http://hlrse.net/Mercury.exe

    http://hlrse.net/Mercury.txt

    http://hlrse.net/Mercury.crc32
    http://hlrse.net/Mercury.md5
    http://hlrse.net/Mercury.sha1
     
    Last edited: Feb 4, 2016
  26. SvenBent

    SvenBent 2[H]4U

    Messages:
    2,657
    Joined:
    Sep 13, 2008
    Hash/checksums from my original file at home

    SHA1
    f60bf4ba0227b1ca6dcba1ee000c1fdc4fda3832

    MD5
    a899b7852974170a02ae1ba43101b5c3

    CRC32
    4ad42a63

    Size
    493,056 bytes
     
  27. SvenBent

    SvenBent 2[H]4U

    Messages:
    2,657
    Joined:
    Sep 13, 2008
    V 1.2.0.0 is released

    Rewrote the code structure to no longer used a loop with timed interval. Insed its now based on a windows hook.
    This results in a dramatic reduce in it already low CPU usage as there is no more CPU resources wasted in check rinse and repeat loops. Instead Windows will send a message as soon as a new window has received focus and call Project Mercury

    Overall CPU usage has dropped from 0.003-0.004% to below 0.0000000000000001% on a Core2 Quad Q6600

    Since there is no delay between checks, it also means Project Mercury now react as fast as possible and no longer up to a 05sec delay in a worst case scenario.

    Due to this new structure i had to remove the code for automatic CPU slice mode due to incompatibilities. I need to look into a total rewrite of the code before i can re implant this feature


    www.TechCenter.dk/Mercury.exe
     
  28. Cerulean

    Cerulean [H]ardForum Junkie

    Messages:
    9,244
    Joined:
    Jul 27, 2006
    Please confirm these checksums.

    MD5
    dfdaa29255a80d32845b153de1033e06

    SHA1
    d4703f4211915ef6b43a4aef1e7122b41b7639d4

    CRC32
    9831b39a

    2/14/2016
     
  29. SvenBent

    SvenBent 2[H]4U

    Messages:
    2,657
    Joined:
    Sep 13, 2008
    Hash info

    MD5 : DFDAA29255A80D32845B153DE1033E06
    SHA-1 : D4703F4211915EF6B43A4AEF1E7122B41B7639D4
    SHA-256 : CA3CD4F43174B22ADC0125CC166F6185AF180D538CC75B32238524630D0B51D4
    SHA-512 : BBCD5F912F2DD05028D3B6D02837739DBC2B32B04192BF690B5AE2A59E29C1C30EF1B4E4D592F3C8C13DE52557270745870D413BB7CF1E0FF3E7023E702D8F2D
     
  30. SvenBent

    SvenBent 2[H]4U

    Messages:
    2,657
    Joined:
    Sep 13, 2008
    Found a little bug.
    When you pause the programs it actually starts to consume around 0.04% CPU ressource on a Core 2 Quad Q6600.
    There is no other known side-effect besides this lightly elevated CPU usage when paused.
    I will trace the code this week and hopefully iron it out soon.
     
  31. Nenu

    Nenu [H]ardened

    Messages:
    18,457
    Joined:
    Apr 28, 2007
    lol, go Sven!
    I dont have a need for your utility any more but I am impressed with what you have achieved.
     
  32. SvenBent

    SvenBent 2[H]4U

    Messages:
    2,657
    Joined:
    Sep 13, 2008
    Glaring bug i the new 1.2 .0.0 Windows hook structure. will be fixed this weekend

    It seems that the windows hook react differently in windows 10 than in windows 7. so current 1.2.0.0 version does NOT work under windows 7. Priorities are not getting adjustet at all.

    Since I don't have win8 i would love feedback from a user. Priority on process can be seen in taskmanager but you have to add in the "base priority" collumn
     
  33. SvenBent

    SvenBent 2[H]4U

    Messages:
    2,657
    Joined:
    Sep 13, 2008
    V 1.2.0.1 is up on www.techcenter.dk. Softpedia should be updated over the weekend.

    - Fixed Windows 7 incompatibility with new Windows hook
    - Fixed to high CPU usage when Paused.
    - Slight improvement in paging (Pages out at Pause)

    Some new features are in the design process

    - Additional clear(execute) process waiting in idle task queue. useful to run before running a benchmark for more consistent results
    - Selection of increased priority level (donation version only)
    - FastReact v1. Increase windows overall feel.
     
  34. ChoGGi

    ChoGGi [H]ard|Gawd

    Messages:
    1,394
    Joined:
    May 7, 2005
    Mirror
    https://choggi.org/files/Mercury.exe

    I didn't see Mercury.exe on your site
    if you want I could make an ftp account to say mercury.choggi.org if you want another file host



    On another note, good ol' Autohotkey :)
    I also have a script to manage my processes, but no fancy automagical priority changing just reading from a list
     
    Last edited: Mar 5, 2016
  35. SvenBent

    SvenBent 2[H]4U

    Messages:
    2,657
    Joined:
    Sep 13, 2008
    Another Mirror would not be bad. I'm hitting bed now but today i got some speed enhancemetns done a miniscule cpu ressoruce optimizations ( reorganized one if setting). but also FastReact option is almost fully done just a small little thing teasing me but if i havent fixed it tomorrow I will release the new version with out that last bit of FastReact and just put it in later. as an upgrade to FastReact
     
  36. ChoGGi

    ChoGGi [H]ard|Gawd

    Messages:
    1,394
    Joined:
    May 7, 2005
    Alrighty, when you have the time send me an email, then we can figure out user/pass.
     
  37. SvenBent

    SvenBent 2[H]4U

    Messages:
    2,657
    Joined:
    Sep 13, 2008
    Beta version from this weekend is being tested as we speak. some benchmark of internal routines needs to be done to make sure FastReact act;s as fast as possible. The entire FastReact features is up and running

    Should I toss in a CPU limiter ? so you can decide percentage wise how fast you want you CPU to run from 5-100%. its a bit arbitrary values as its finally gonna be determine by the different P-states of your CPU
     
  38. SvenBent

    SvenBent 2[H]4U

    Messages:
    2,657
    Joined:
    Sep 13, 2008
    V 1.2.2.0

    New version is released and on my Home site. Softpedia Should update withing 24 hours


    - Clear Memory now works intelligently, greatly increasing its speed

    - Project Mercury's own page out routine improved to double speed

    - Optimized some IF settings for minuscule reduced CPU usage

    - Removed nonworking priority settings menu (was leftover from experiment)

    - Implanted "Windows FastReact" features that speeds up windows

    - Implanted "Save Settings" feature


    Notice that "Windows FastReact" feature has a nag screen That is gone in the donator edition
    If the new donations model violates any forum rules about advertisement a mod can hit me up in a PM or in this thread


    www.TechCenter.dk/Mercury.exe
     
  39. SvenBent

    SvenBent 2[H]4U

    Messages:
    2,657
    Joined:
    Sep 13, 2008
    Didn't get as much done as I was hoping for but got at least some small stuff done.

    V1.2.3.0
    - Windows FastReact settings are now saved when choosing save settings
    - Implanted "No Standby on CPU load" feature
    - InfoBox now has a link to www.Techcenter.dk


    The No standby features is still very new and lacks customization. But it does prevent going to standby if CPU load is above 8% on a 10second average tested aprox. twice a min.
    The CPU usage from this feature is far below WinOFF but does take around 0.014% on my Core I7 2500k @4.6GHz ( WINoff takes around 0.09%
    The is 0% CPU load if the features is not enabled (default)

    www.TechCenter.dk is Updated
    Softpedia should be updated within 24h
     
  40. SvenBent

    SvenBent 2[H]4U

    Messages:
    2,657
    Joined:
    Sep 13, 2008
    V 1.2.4.0

    Now also in 32bit version

    - New Settings GUI
    - Increased CPU priority level can now be adjusted and saved
    - Fixed typo Ballon to Balloon


    www.TechCenter.dk is updated
    Softpedia Should be updated within 24 hours