GithubHelp home page GithubHelp logo

apppolice / apppolice Goto Github PK

View Code? Open in Web Editor NEW
1.1K 30.0 88.0 11.36 MB

MacOS app for quickly limiting CPU usage by running applications

License: GNU General Public License v2.0

Objective-C 80.74% C 18.86% C++ 0.40%

apppolice's Introduction

AppPolice

An app for Mac OS X with a minimalistic UI which lets you quickly throttle down the CPU usage of any running process.

Main

Main 2

On initial run you will be presented with the following notification:

Warning

Simply right click and choose "Open". You'll have to do it just once:

Open

Open

Build

The project requires a dependancy ChromeMenu.Framework. Clone both AppPolice and ChromeMenu into the same directory.

Requirements

An app requires OS X Lion 10.7 and up.

Download

Go to Releases to get the latest .dmg file.

apppolice's People

Contributors

fuyu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

apppolice's Issues

Unable to slow WineSkin App on 10.10

Hi,

I found an App that isn't reporting CPU use and I can't slow it down. Probably some Wine behind the scenes tricks..

Screenshot shows:
PID 69894 is 374% in Activity manager but PID 69821 is showing in Apppolice.
PID 69821 does show in Apppolice but only using 0.48%

Is this Wine or Mandelbulb related?

screen shot 2015-04-30 at 1 23 45 pm

Is it possible to limit WindowServer?

I have an old app that causes WindowServer to spin up, and I think limiting it when I use that app might help. But I don't see WindowServer listed after I set AppPolice to show system processes. Is that intended?

(I also tried a different utility, cputhrottle, and while that does seem to throttle WindowServer and affect the % CPU in Activity Monitor, strangely, depending on if I was running my own account or a fresh user account, the utility would crash.)

Feature request: move limited processes to top of list

First of all, this app is a godsend. I'm often doing CPU-intensive stuff in the background (like ffmpeg) that I want to throttle to be able to use my computer in the meantime, and also find other background utilities I want to throttle generally (e.g. never let Google Drive use more than 5% CPU, because it often stays at 50%).

And I know it hasn't been updated in years, and so this will probably never happen, but I do hope!

But it would be a huge help if currently-throttled processes showed up at the top of the menu, rather than alphabetical. Because when I want to change "ffmpeg" (many times during the day, often) I have to scroll past probably 100 earlier processes literally every single time to find it.

Thanks!

does it work for m1 mac?

I am expecting that if i am to choose chrome and limit the cpu to 1% it should be showing some signs of performance lag.

I do not see that.

I am trying to understand if my expectation is wrong?

Feature request: allow CPU usage bursts

I actually think that most issues with CPU usage come down to things that run in the background constantly. We don't want those adding up, but at the same time when such an app actually needs CPU, it would be nice to have it.

I am basically recommending/requesting a "CPU credit" approach like what AWS uses.

The implementation of this would come down to something like the max CPU % being a formula instead of a fixed value. The formula would be something like (in pseudo code):

IF utilization > baseline_rate AND cpu_credits > 0 THEN 
    cpu_limit = surge_rate
    cpu_credits = cpu_credits - surge_rate
ELSE
    cpu_limit = baseline_rate
    cpu_credits = cpu_credits + baseline_rate

baseline_rate and surge_rate are CPU%/minute

Everything would be updated once every minute.

Commands run via sudo not included

I just run sudo grep -r something and it, of course, used a lot of CPU. However, the grep process were nowhere to be found in the process list. However, Terminal and zsh was listed there but limiting them had no effect.

Two suggestions:

  1. Somehow include things run as sudo by the current user (it is not limited to the CLI, I sometimes launch the Finder using sudo to be able manipulate the system part of the file system).

  2. If I limit Terminal or zsh, this limit should propagate to all their daughter processes.

Cannot limit CPU for Spotlight indexing services

I enabled the system processes in the Preferences, but I can see just the mdworker processes in the list, while what's eating my CPU are the process mds_stores and mds.

Is it because they are executed by root?

How can I limit all that CPU hogging from these two processes?

Doesn't limit CPU on logon until I mouseover 'running apps'?

The offending app for me is Google Backup and Sync. It always runs at 100% CPU for a few minutes when I boot, the fans go crazy. I have set App Police to throttle this, and I have set App Police to a) Restore app limits at launch and b) Start at login.

But, when I login, nothing is throttled. I've tested it various times, it is when I specifically click on the icon in the menubar, and then mouseover 'running apps' does it actually start the throttle.

What's up with this? If there is no proper solution, is there something hacky I can do to 'poke' App Police into working on startup- perhaps some startup script that changes some CPU level from 100 to 50 back to 100 just to get it to wake up?

rsync?

When running Carbon Copy Cloner, the rysnc process is the culprit, not the app itself, but rsync is not listed in the list of apps or system processes. Any thoughts? Thanks.

Not working with handbrake vers Version 1.3.0 (2019110900)

Using Apppolice on Mojave seems to work fine except on handbrake vers Version 1.3.0 (2019110900). Nothing happens when moving the slider to set the CPU usage within apppolice (also the yellow or red color when sliding CPU usage will not show. Sliding the CPU setting will result in no change in CPU usage, handbrake continues to run at max)

Apppolice will work on the same OS with handbrake version 1.2.0 however.

Seems like something has changed in handbrake vers Version 1.3.0 (2019110900)

If you would like more info or want me to test something just let me know
Thanks

Cannot limit BDLDaemon

Trying to find a program that will tame BDLDaemon. This one looked promising but BDLDaemon doesn't show up in either the user running processes or the system one.

Any idea how to limit this?

Set Max for Any App Ever CPU limit.

On the newer macs, I continually have offending apps that report on Activity Monitor as MORE than 100%. i'd like to ensure that no app ever is allowed to use more than 100%. Perhaps it shouuld be, say 90% max, so that urgent requests to 'stop silly item' are respected.

I'm not sure if 100% CPU represents all cores or just one, but on my two machines with this issue (both MBP), when it gets to 100% the fans are screaming and my machine feels very unhappy.

Thank you for a terrific project and app! I'm not sure I'm capable of contributing, but I will peek around when I get a minute.

Not always showing all programs issue

In High Sierra AppPolice does not limit applications immediately upon bootup.
I need to show the running apps in it a couple of times for it to see the desired application

It doesn't work with HandBrake

Hello,
I tested the app and it fails to reduce HandBrake's resource usage.

It's also a shame that I have to control everything from the menu bar. Is there no way to use the app like any other app? The field is constantly disappearing where you can reduce the load on apps. If I reduce the load on apps and restart the app, it has forgotten all its settings and I have to reset everything.

And a large number of programs do not manage to shut down a program. You are using renice, but it is not intended for it. Does your app use a program that is integrated in macOS? And you don't need administrator rights to actually be able to do something like that.

Thank you for this great app and your efforts <3

Strange behavior with audio

This app is so convenient.

I am using a MacBook Pro (2017, with macOS 10.12.6), and I'm having some problem with apps playing audio. I have to say I have the same problem just using cputhrottle, but perhaps you have some clue as to where this is coming from.

I am using AppPolice to limit the Flash plugin process in Firefox. The problem I'm having is that when AppPolice is active, and some other app is playing audio, there are audible intermittent "clicks" in the playback, like the audio is breaking out for small fractions of a second. As soon as I pause AppPolice, the audio is clear again.

Feature Request: GUI (not a menu app)

create a single window app with a table view

why? the menu app is with a big list of apps in the sub menu very complicated to use:

  • no multiselect
  • need scrolling
  • no additional infos about the current status of the apps
  • not sorted

Temporarily run whatever app is in the foreground at 100%

Most apps should probably just be throttled when they're in the background, and
get some CPU power back when in the foreground so the UI isn't laggy.

Maybe require an active keystroke or mouse movement every X seconds, and if one isn't noticed throttle foreground app back down to its slider level until the user comes back.

WindowServer

It seems there are quite a bit of people concerned with WindowServer hogging the CPU power.
https://www.google.com/search?q=windowserver+mac+high+cpu

I chose "Show system processes" from AppPolice Pref window. Toggled between App name & Process ID.
But could not find anything that resembles "WindowServer"

When I click on the process from Activity Monitor, I see

Parent Process: launchd (1)
User: windowserver (88)
Process Group: WindowServer (170)
% CPU: 59.09

Any tips on how to limit the CPU usage of this specific process?

Pause and continue process (SIGSTOP and SIGCONT)

Hi,

would it be difficult to implement process pause and continue feature? For instance there is no 0% cpu limit, that could be kill -SIGSTOP . If it increased, then kill -SIGCONT <process> could be applied to make process responding.

Another good feature is SIGSTOP when app is not active and SIGCONT when it's active.

It could help

  • to save battery

  • CPU heavy apps like Ableton, when you stop making music - coolers are laud anyway and you should close large project and load it later again, it takes time

  • A lot of others

Thank you

Start at login, some app can not appear in list, have to restart AppPolice.

I use AppPolice to limit onedrive, both of AppPolice and onedrive are start at login.
AppPolice looks start before onedrive, and after onedrive started, I still can not find it in Running Apps.
I have to quit AppPolice, and start again, onedrive appears in the Running Apps.


AppPolice ver1.1,
MacOS 10.13.6,
onedrive is the newest version from Appstore.

Is this project dead?

I was just wondering if this project is dead. There have been no releases after 2016.

AppPolice seems to forget, or gets overruled?

Thanks first of all, for making such program to limit certain running tasks. As it is impossible to cool an 27" imac properly and components will fail (desolder) when the POS gets to hot. But that is something Apple adressed with the new iMacs recently. But all the users of iMacs (and mac Pro's) are victims of this lack of proper cooling. So basically you buy a ferrari, which overheats going faster than 70MPH.

On to the issue; when i install the app and (for instance) tell it to limit HandBrakeCLI (system task) to let's say 150% which seems to do magic allready letting my machine run cooler. This application is a batch front end for Handbrake, this can do encodings (video) in batch processing. It seems that while doing an encoding batch, of 20 files (which take up 2 hours easy) and now and then the cpu tasking goes back up to maximum 400% out of thin air.

screen shot 2017-06-24 at 20 15 45
screen shot 2017-06-24 at 20 16 04
screen shot 2017-06-24 at 20 16 22

The solution is, to click the AppPolice icon and touch the HandBrakeCLI rule (still with the right settings) and it comes back down again (the throttling). My guess is, that the OS seems to overrule the application AppPolice.

doesn't list all processes

Kinda difficult to limit cpu for an offending process when it's not listed in the apppolice UI.

Mac OS 10.14.6

Apppolice 1.1

Everything lagging when limiting any app to <30%

Macbook pro 13 late 2011
Everything starts to work with some king of delay when limiting any app to use 30% or less of CPU.
For example when I point my mouse on any app in my dock, the popup text with the name of app appears only within 3-5 seconds. And everything works like that. But when I change limit to 130% everything works fine.
But anyway the app is great!

Unable to find all system processes

Not all system processes are visible in the menu.

For example - VMware Fusion also runs a process vmware-vmx which cannot be seen anywhere in AppPolice. Is there a workaround to this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.