GithubHelp home page GithubHelp logo

cpu-lock's Introduction

cpu-lock

Lock a terminal command to the efficiency or performance cores on a big.LITTLE ARM processor (Designed for Apple Silicon).

Usage

Download the precompiled binary from the releases and run it in the terminal like so: ./cpulock -c "your command here"

Available command line options are:

    -e           : lock command to effeciency cores (default)
    -p           : lock command to performance cores
    -l <string>  : set command launch path (default is "/bin/bash")
    -c <string>  : insert command to run
    -h           : help

If you would like to add the binary to your usr/local/bin/, you may run the following: sudo cp ./cpulock /usr/local/bin

Example

In testing ./cpulock wih my M1cpufreq command:

./cpufreq -ec "M1cpufreq -m" (which locked the script to the M1 effciiency cores) outputted 2064 mHz

./cpufreq -pc "M1cpufreq -m" (which locked the script to the M1 performance cores) outputted 3090 mHz

These outputs fall in line with the description of the maximum efficiency and performance core clock speeds on the M1 CPU.

Known Issues

Locking commands that constantly output data, such as powermetrics, cannot be stopped using control-c. The only way to stop the command is to close the terminal window it's being ran in. This issue is crrently under investigation.

Bugs and Issues

If you can't diagnose the problem yourself, feel free to open an Issue. I'll try to figure out what's going on as soon as possible.

cpu-lock's People

Contributors

dehydratedpotato avatar

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.