{"id":17685898,"url":"https://github.com/felipealfonsog/opticpu","last_synced_at":"2026-02-17T18:03:57.363Z","repository":{"id":238629142,"uuid":"797051266","full_name":"felipealfonsog/OptiCPU","owner":"felipealfonsog","description":"OptiCPU: A utility for continuously optimizing system resources, particularly CPU usage, on Linux systems.","archived":false,"fork":false,"pushed_at":"2026-01-31T11:48:05.000Z","size":1792,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-31T23:43:02.891Z","etag":null,"topics":["cpu","linux","optimizing","system"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/felipealfonsog.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["felipealfonsog"],"patreon":"felipealfonsogl","custom":["https://www.buymeacoffee.com/felipealfonsog"]}},"created_at":"2024-05-07T05:26:41.000Z","updated_at":"2025-11-26T08:56:00.000Z","dependencies_parsed_at":"2024-05-20T06:32:23.449Z","dependency_job_id":"b630417c-e35c-4ff9-9310-15c80f3c281b","html_url":"https://github.com/felipealfonsog/OptiCPU","commit_stats":null,"previous_names":["felipealfonsog/opticpu"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/felipealfonsog/OptiCPU","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipealfonsog%2FOptiCPU","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipealfonsog%2FOptiCPU/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipealfonsog%2FOptiCPU/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipealfonsog%2FOptiCPU/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/felipealfonsog","download_url":"https://codeload.github.com/felipealfonsog/OptiCPU/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipealfonsog%2FOptiCPU/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29552252,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T17:56:56.811Z","status":"ssl_error","status_checked_at":"2026-02-17T17:56:55.544Z","response_time":100,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpu","linux","optimizing","system"],"created_at":"2024-10-24T10:29:25.640Z","updated_at":"2026-02-17T18:03:57.348Z","avatar_url":"https://github.com/felipealfonsog.png","language":"C","funding_links":["https://github.com/sponsors/felipealfonsog","https://patreon.com/felipealfonsogl","https://www.buymeacoffee.com/felipealfonsog","https://www.paypal.me/felipealfonsog"],"categories":[],"sub_categories":[],"readme":"### OptiCPU 🔧\n\nOptiCPU is an advanced utility crafted to continuously optimize system resources, with a primary focus on enhancing CPU usage efficiency, on Linux-based operating systems. The project aims to provide users with a comprehensive toolset to dynamically manage CPU resources, fine-tune system parameters, and adaptively adjust system settings to maintain optimal performance under varying workloads. By employing sophisticated algorithms and real-time monitoring techniques, OptiCPU intelligently adjusts CPU frequency, process priorities, memory management settings, disk I/O configurations, and network parameters to ensure efficient resource utilization while minimizing system overhead. Whether you're operating on older hardware with limited resources or managing high-performance systems, OptiCPU offers a versatile solution to enhance system responsiveness and overall performance, providing a seamless computing experience for users across diverse environments.\n\n# \n\n[![OptiCPU Philosophy](https://img.shields.io/badge/OptiCPU-Philosophy-green)](#)\n\n\nIn today's fast-paced technological landscape, older hardware often struggles to keep up with the demands of modern software. Many users still rely on aging computers that may not have the resources to smoothly run the latest operating systems and applications. Recognizing this challenge, my goal is to provide a solution tailored to such older hardware, particularly those running Linux, with a preference for Arch Linux due to its lightweight and customizable nature.\n\nThe idea is to develop a suite of optimization tools that enhance the performance of these older systems, allowing them to run more efficiently and effectively. By focusing on optimizing resource usage, such as CPU, memory, disk I/O, and network activity, we aim to breathe new life into these aging machines.\n\nThe key philosophy behind this project is to leverage the flexibility and versatility of Linux, particularly Arch Linux, to create a tailored optimization solution. This involves fine-tuning system settings, adjusting resource allocation, and implementing intelligent monitoring mechanisms to dynamically adapt to changing workload demands.\n\nBy empowering users with the ability to optimize their systems, we enable them to extend the lifespan of their hardware, reduce electronic waste, and continue to benefit from the many advantages of Linux computing. Ultimately, this initiative aligns with the principles of sustainability, accessibility, and empowerment, ensuring that even older hardware can thrive in today's digital ecosystem.\n\n\u003c!-- \n[![Warning: This Project is Unstable](https://img.shields.io/badge/Warning-This_Project_is_Unstable-red)](#)\n\n\u003e [!WARNING]\n\u003e This project is a work in progress. The first stable, feature-complete release\n\u003e will be version 1.0.0. As such, it is advised that you do not use this as your daily driver\n\u003e unless you are willing to encounter some paper cuts along the way. If you are willing to \n\u003e lend your time to find bugs, fix bugs, or submit proposals for new features, it would\n\u003e be greatly appreciated.\n--\u003e\n\n\u003e [!WARNING]\n\u003e This project is a dynamic work in progress. Version 1.0.0, our inaugural stable and fully-featured release, \n\u003e is on the horizon. While it's not yet recommended for daily use due to potential minor inconveniences,\n\u003e we welcome enthusiasts to help uncover and resolve bugs or propose exciting new features.\n\n\u003csub\u003e* This is currently an experimental phase where the primary focus is on making the system functional and establishing a practical and logical pathway that aligns with both my vision and the project's goals. It might contain errors, bugs, etc. Many other non-core elements of the project are considered secondary.\u003c/sub\u003e\n\n![Version](https://img.shields.io/github/release/felipealfonsog/OptiCPU.svg?style=flat\u0026color=blue)\n![Main Language](https://img.shields.io/github/languages/top/felipealfonsog/OptiCPU.svg?style=flat\u0026color=blue)\n[![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/)\n\n\n[![BSD 3-Clause License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)\n\n\u003c!--\n[![GPL license](https://img.shields.io/badge/License-GPL-blue.svg)](http://perso.crans.org/besson/LICENSE.html)\n--\u003e\n\n[![Vim Powered](https://img.shields.io/badge/Vim-Powered-%2311AB00.svg?logo=vim\u0026logoColor=white)](https://www.vim.org)\n[![VS Code Powered](https://img.shields.io/badge/VS%20Code-Powered-%23007ACC.svg?logo=visualstudiocode\u0026logoColor=white)](https://code.visualstudio.com/)\n\n\n#\n\n#### Screenshots\n#### OptiCPU running\n\n[![View Screenshots](https://img.shields.io/badge/View-Screenshots-yellow)](#)\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./images/opticpu-running.png\" alt=\"Screenshot Usage\" width=\"600\" height=\"450\"\u003e\n\u003c/p\u003e\n\n##### Only 1.6 MBG in memory!\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./images/usage-mgb.JPG\" alt=\"Screenshot Usage\" width=\"700\" height=\"73\"\u003e\n\u003c/p\u003e\n\n#\n\n\n#### In this code\n\n- `adjust_cpu_parameters()` Function:\n  - Adjusts CPU parameters by setting the CPU frequency governor to \"performance\" using the `cpupower frequency-set -g performance` command with superuser privileges.\n\n- `optimize_cpu()` Function:\n  - Sets the priority of the process to optimize CPU usage by calling `setpriority(PRIO_PROCESS, 0, -10)`.\n\n- `optimize_memory()` Function:\n  - Monitors available memory and swap usage to optimize memory usage. It may adjust memory settings if memory usage exceeds a defined threshold.\n\n- `optimize_disk_io()` Function:\n  - Monitors disk I/O activity using the `iostat` command and adjusts disk scheduler settings if disk utilization is high.\n\n- `optimize_network()` Function:\n  - Monitors network activity using the `sar` command and adjusts network settings if network utilization is high.\n\n- `optimize_system()` Function:\n  - Calls all optimization functions (`optimize_cpu()`, `optimize_memory()`, `optimize_disk_io()`, `optimize_network()`) to continuously optimize system resources. This function is executed in a loop to repeatedly optimize the system.\n\n\n\n#\n\n\n\n#### Installation\n#### Via AUR using YAY\n\n[![OptiCPU](https://img.shields.io/badge/OptiCPU-green)](#)\n\n[![AUR](https://img.shields.io/aur/version/opticpu)](https://aur.archlinux.org/packages/opticpu)\n\n\u003c!-- \n[![AUR](https://img.shields.io/aur/version/opticpu.svg)](https://aur.archlinux.org/packages/opticpu)\n--\u003e\n\nhttps://aur.archlinux.org/packages/opticpu\n\nOptiCPU is available on AUR (Arch User Repository), and it can be installed using the `yay` package manager. Follow the steps below to install it:\n\n1. Make sure you have `yay` installed. If not, you can install it with the following command:\n   \n   ```\n   sudo pacman -S yay\n   ```\n   \n   Once yay is installed, you can install by running the following command:\n   \n   ```\n   yay -S opticpu\n   ```\n\nThis command will automatically fetch the package from AUR and handle the installation process for you.\nRun it with the command opticpu.\n\n\u003csub\u003eAfter to install it with yay, install it [as a service](https://github.com/felipealfonsog/OptiCPU?tab=readme-ov-file#setting-up-opticpu-as-a-service) with -sudo-.\u003c/sub\u003e\n\n#\n\n#### Debian GNU and Kali Linux .deb Installer\n\n[![Debian Installer](https://img.shields.io/badge/Debian/GNU%20Linux%20Installer-Available-brightgreen)](#)\n\n[![Kali Installer](https://img.shields.io/badge/Kali%20Linux%20Installer-Available-purple)](#)\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./images/debian-install.jpg\" alt=\"Screenshot Usage\" width=\"600\" height=\"450\"\u003e\n\u003c/p\u003e\n\n\n#### To Install it: \n\nThe .deb file for Debian based distros: [here](https://github.com/felipealfonsog/OptiCPU/raw/main/DEBIAN/opticpu/opticpu.deb).\n\nOr just Copy - Paste in your terminal and use -curl- to start downloading the file:\n\n   ```\n   curl -O https://github.com/felipealfonsog/OptiCPU/raw/main/DEBIAN/opticpu/opticpu.deb\n   ```\n\nIf you want to use -wget- just copy/paste this line:\n\n   ```\n   wget https://github.com/felipealfonsog/OptiCPU/raw/main/DEBIAN/opticpu/opticpu.deb\n   ```\n\nInstall it:\n\n   ```\n   sudo dpkg -i opticpu.deb\n   ```\n\n\u003csub\u003eThis installer has been tested under Debian and Kali Linux.\u003c/sub\u003e\n\n#\n\n#### Bash Installer 🚀 for Linux\n\n[![Bash Installer Version](https://img.shields.io/badge/Bash%20Installer%20Version-Available-brightgreen)](#)\n\n#### To Install it: \n\nTo install it, simply run the installer script available [here](https://github.com/felipealfonsog/OptiCPU/raw/main/installer.sh).\n\nOr just Copy - Paste in your terminal and use -curl- to start downloading the installer:\n\n   ```\n   curl -O https://raw.githubusercontent.com/felipealfonsog/OptiCPU/main/installer.sh\n   ```\n\nIf you want to use -wget- just copy/paste this line:\n\n   ```\n   wget https://github.com/felipealfonsog/OptiCPU/raw/main/installer.sh\n   ```\n\n   On macOS to download - wget - just install it with Homebrew:\n\n   ```\n   brew install wget\n   ```\n\n\u003csub\u003eAfter to install it with yay, install it [as a service](https://github.com/felipealfonsog/OptiCPU?tab=readme-ov-file#setting-up-opticpu-as-a-service) with -sudo-.\u003c/sub\u003e\n\n#### Important note when installing:\n\nIf you encounter issues executing the file in the terminal, like this message \"-bash: ./installer.sh: Permission denied\", follow these simple steps to fix it:\n\n1. Open your terminal.\n2. Navigate to the directory where the installer script is located using the `cd` command.\n3. Run the following command to grant execute permission to the installer script:\n\n   ```\n   chmod +x installer.sh\n   ```\n   \n4. Now you can run the installer without any problems.\n\n   ```\n   ./installer.sh\n   ```\n   NOTE: The script will ask for -sudo permissions-. Just simply type in Linux your -sudo- password.\n\nNow type 'opticpu' in the terminal and enjoy using it! 😊🚀\n\n\nFeel free to reach out if you need any further assistance!\n\n#### Updating with the script: \n\nIf you want to update the program in your system, download the bash and re-run the script:\n\n   ```\n   ./installer.sh\n   ```\nPlease note that if you encounter any issues or have suggestions, feel free to raise an issue on the [OptiCPU repository](https://github.com/felipealfonsog/OptiCPU/issues). Your feedback is invaluable!\n\nThank you for joining me on this journey, and I hope it brings value to your life and workflow. Let's continue making technology accessible and enjoyable for everyone!\n\n#\n\n\n#### Setting up \"OptiCPU\" as a Service\n\n[![OptiCPU Service](https://img.shields.io/badge/OptiCPU-Service-green)](#)\n\n#### Use the Bash - Daemon Installer\n\n\n ```\ncurl -O https://raw.githubusercontent.com/felipealfonsog/OptiCPU/main/installer-daemon.sh\n\n ```\n\n ```\nchmod +x installer-daemon.sh\n\n./installer-daemon.sh\n\n ```\n\n\n#### Configure the service manually\n\n1. Create a Service File\n\nCreate a new service file for \"OptiCPU\" using a text editor of your choice. For example:\n\n```\nsudo nano /etc/systemd/system/opticpu.service\n```\n\n2. Add Service Configuration\nPaste the following configuration into the opticpu.service file:\n\n```\n[Unit]\nDescription=OptiCPU Optimization Service\nAfter=network.target\n\n[Service]\nType=simple\nExecStart=/usr/bin/opticpu\nRestart=always\n\n[Install]\nWantedBy=multi-user.target\n```\n\nThis configuration specifies that the service should start \"OptiCPU\" on boot and restart it if it crashes.\n\n3. Save and Close the File\n\nAfter adding the configuration, save and close the file.\n\n4. Enable and Start the Service\n\nEnable the \"opticpu\" service to start automatically on boot:\n\n```\nsudo systemctl enable opticpu\n```\n\n```\nStart the \"opticpu\" service:\n```\n\n```\nsudo systemctl start opticpu\n```\n\n5. Check Service Status\n\nYou can check the status of the \"opticpu\" service to ensure it's running:\n\n```\nsudo systemctl status opticpu\n```\n\n6. Optionally, Stop or Disable the Service\n\nTo stop the \"opticpu\" service:\n\n```\nsudo systemctl stop opticpu\n```\n\nTo disable the \"opticpu\" service from starting automatically on boot:\n\n```\nsudo systemctl disable opticpu\n```\n\n#\n\n\n#### 🌟 Contact the Creator and Engineer Behind This Project\n\n\n\n👨‍💻 **Felipe Alfonso González**  \n📧 Email: [f.alfonso@res-ear.ch](mailto:f.alfonso@res-ear.ch)  \n🐦 x (Twitter): [@felipealfonsog](https://twitter.com/felipealfonsog)  \n🔗 GitHub: [felipealfonsog](https://github.com/felipealfonsog)  \n📄 License: BSD 3-Clause  \n\n\n#\n\n#### 🤝 Support and Contributions\n\nIf you find this project helpful and would like to support its development, there are several ways you can contribute:\n\n- **Code Contributions**: If you're a developer, you can contribute by submitting pull requests with bug fixes, new features, or improvements. Feel free to fork the project (development branch) and create your own branch to work on.\n- **Bug Reports and Feedback**: If you encounter any issues or have suggestions for improvement, please open an issue on the project's GitHub repository. Your feedback is valuable in making the project better.\n- **Documentation**: Improving the documentation is always appreciated. If you find any gaps or have suggestions to enhance the project's documentation, please let me know.\n\n[![Buy Me a Coffee](https://img.shields.io/badge/Buy%20Me%20a%20Coffee-%E2%98%95-FFDD00?style=flat-square\u0026logo=buy-me-a-coffee\u0026logoColor=black)](https://www.buymeacoffee.com/felipealfonsog)\n[![PayPal](https://img.shields.io/badge/Donate%20with-PayPal-00457C?style=flat-square\u0026logo=paypal\u0026logoColor=white)](https://www.paypal.me/felipealfonsog)\n[![GitHub Sponsors](https://img.shields.io/badge/Sponsor%20me%20on-GitHub-%23EA4AAA?style=flat-square\u0026logo=github-sponsors\u0026logoColor=white)](https://github.com/sponsors/felipealfonsog)\n\nYour support and contributions are greatly appreciated! Thank you for your help in making this project better. If you need to mail me, this is the way: f.alfonso@res-ear.ch (I'm Felipe, the Computer Science Engineer behind this idea. Cheers!)\n\n\n#### 📄 License\n\nThis project is licensed under the [BSD 3-Clause License](LICENSE). It will have some restrictions, ask about it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffelipealfonsog%2Fopticpu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffelipealfonsog%2Fopticpu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffelipealfonsog%2Fopticpu/lists"}