{"id":13423353,"url":"https://github.com/sbu-fsl/kernel-ml","last_synced_at":"2026-03-07T03:31:35.762Z","repository":{"id":80077423,"uuid":"426757214","full_name":"sbu-fsl/kernel-ml","owner":"sbu-fsl","description":"Machine Learning Framework for Operating Systems - Brings ML to Linux kernel","archived":false,"fork":false,"pushed_at":"2021-12-13T04:47:56.000Z","size":147258,"stargazers_count":244,"open_issues_count":6,"forks_count":28,"subscribers_count":17,"default_branch":"main","last_synced_at":"2025-05-09T00:09:24.573Z","etag":null,"topics":["auto-tuning","kernel-module","linux-kernel","machine-learning","mlsys","operating-systems"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sbu-fsl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-11-10T19:52:00.000Z","updated_at":"2025-05-01T18:43:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"2f01e5d4-0a4a-4845-870e-b98f745e67b6","html_url":"https://github.com/sbu-fsl/kernel-ml","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/sbu-fsl/kernel-ml","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbu-fsl%2Fkernel-ml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbu-fsl%2Fkernel-ml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbu-fsl%2Fkernel-ml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbu-fsl%2Fkernel-ml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sbu-fsl","download_url":"https://codeload.github.com/sbu-fsl/kernel-ml/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbu-fsl%2Fkernel-ml/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30206567,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T03:24:23.086Z","status":"ssl_error","status_checked_at":"2026-03-07T03:23:11.444Z","response_time":53,"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":["auto-tuning","kernel-module","linux-kernel","machine-learning","mlsys","operating-systems"],"created_at":"2024-07-31T00:00:32.476Z","updated_at":"2026-03-07T03:31:35.744Z","avatar_url":"https://github.com/sbu-fsl.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"docs/images/Logo.png\" alt=\"logo\"\u003e\u003c/img\u003e\n\u003c/div\u003e\n\n# KML: A Machine Learning Framework for Operating Systems \u0026 Storage Systems\n\n[![CircleCI](https://circleci.com/gh/sbu-fsl/kernel-ml/tree/main.svg?style=svg\u0026circle-token=fc045b4ae0ae1cdb693a9e6b3f8dfda1aace460f)](https://circleci.com/gh/sbu-fsl/kernel-ml/tree/main)\n[![codecov](https://codecov.io/gh/sbu-fsl/kernel-ml/branch/main/graph/badge.svg?token=NTTV1TCRN9)](https://codecov.io/gh/sbu-fsl/kernel-ml)\n\nStorage systems and their OS components are designed to accommodate a wide variety of applications and dynamic workloads. Storage components inside the OS contain various heuristic algorithms to provide high performance and adaptability for different workloads. These heuristics may be tunable via parameters, and some system calls allow users to optimize their system performance. These parameters are often predetermined based on experiments with limited applications and hardware. Thus, storage systems often run with these predetermined and possibly suboptimal values. Tuning these parameters manually is impractical: one needs an adaptive, intelligent system to handle dynamic and complex workloads. Machine learning (ML) techniques are capable of recognizing patterns, abstracting them, and making predictions on new data. ML can be a key component to optimize and adapt storage systems. We propose KML, an ML framework for operating systems \u0026 storage systems. We implemented a prototype and demonstrated its capabilities on the well-known problem of tuning optimal readahead values. Our results show that KML has a small memory footprint, introduces negligible overhead, and yet enhances throughput by as much as 2.3×.\n\nFor more information on the KML project, please see our papers \n- [A Machine Learning Framework to Improve Storage System Performance](https://dl.acm.org/doi/10.1145/3465332.3470875)\n- [KML: Using Machine Learning to Improve Storage Systems](https://www.fsl.cs.sunysb.edu/docs/kml/kml-tr-fsl-21-02.pdf)\n- [KML: Using Machine Learning to Improve Storage Systems (Arxiv)](https://arxiv.org/abs/2111.11554)\n\nKML is under development by Ibrahim Umit Akgun of the File Systems and Storage Lab (FSL) at Stony Brook University under Professor Erez Zadok.\n\n## Table of Contents\n\n- [Setup](#Setup)\n  - [Clone KML](#Clone-KML)\n  - [Build Dependencies](#Build-Dependencies)\n  - [Install KML Linux Kernel Modifications](#Install-KML-Linux-Kernel-Modifications)\n  - [Specify Kernel Header Location](#Specify-Kernel-Header-Location)\n  - [Build KML](#Build-KML)\n  - [Double Check](#Double-Check)\n- [Example](#Example)\n- [Design](#Design)\n  - [API](#API)\n- [Citing KML](#Citing-KML)\n\n## Setup\n\n### Clone KML\n\n```bash\n# SSH\ngit clone --recurse-submodules git@github.com:sbu-fsl/kernel-ml.git\n\n# HTTPS\ngit clone --recurse-submodules https://github.com/sbu-fsl/kernel-ml.git\n````\n\n### Build Dependencies\n\nKML depends on the following third-party repositories:\n\n- [google/benchmark](https://github.com/google/benchmark)\n- [google/googletest](https://github.com/google/googletest)\n\n```bash\n# Create and enter a directory for dependencies\nmkdir dependencies\ncd dependencies\n\n# Clone repositories\ngit clone https://github.com/google/benchmark.git\ngit clone https://github.com/google/googletest.git\n\n# Build google/benchmark\ncd benchmark\nmkdir build\ncd build\ncmake -DCMAKE_BUILD_TYPE=Release ../\nmake\nsudo make install\n\n# Build google/googletest\ncd ../googletest\nmkdir build\ncd build\ncmake -DCMAKE_BUILD_TYPE=Release ../\nmake\nsudo make install\ncd ../..\n```\n\n### Install KML Linux Kernel Modifications\n\nKML requires Linux kernel modifications to function. We recommend allocating at least 25 GiB of disk space before beginning the installation process.\n\n1. Navigate to the `kernel-ml/kernel-ml-linux` directory. This repository was recursively cloned during setup\n    ```bash\n    cd kernel-ml-linux\n    ```\n1. Install the following packages\n    ```\n    git fakeroot build-essential ncurses-dev xz-utils libssl-dev bc flex libelf-dev bison\n    ```\n1. Install the modified kernel as normal. No changes are required for `make menuconfig`\n    ```bash\n    cp /boot/config-$(uname -r) .config\n    make menuconfig\n    make -j$(nproc)\n    sudo make modules_install -j$(nproc)\n    sudo make install -j$(nproc)\n    ```\n1. Restart your machine\n    ```\n    sudo reboot\n    ```\n1. Confirm that you now have Linux version `4.19.51+` installed\n    ```bash\n    uname -a\n    ```\n    \n### Specify Kernel Header Location\n\nEdit `kernel-ml/cmake/FindKernelHeaders.cmake` to specify the **absolute path** to the aforementioned `kernel-ml/kernel-ml-linux` directory. For example, if `kernel-ml-linux` lives in `/home/kernel-ml/kernel-ml-linux`:\n\n```cmake\n...\n\n# Find the headers\nfind_path(KERNELHEADERS_DIR\n        include/linux/user.h\n        PATHS /home/kernel-ml/kernel-ml-linux\n)\n\n...\n```\n\n### Build KML\n\n```bash\n# Create a build directory for KML\nmkdir build\ncd build \ncmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=\"-Werror\" ..\nmake\n```\n\n### Double Check\n\nIn order to check everything is OK, we can run tests and benchmarks.\n```bash\ncd build\nctest --verbose\n```\n\n## Design\n![kernel-design](docs/images/arch-online-kernel.jpg) \n\n## API\nDevelopers can find the kernel-ml development API in ```include/kml_lib.h``` header file.\nAll other application related APIs are also placed in ```include``` directory (e.g. ```sgd_optimizer.h, layers.h, loss.h```)\n\n## Example\n\n## Citing KML\n\nTo cite this repository:\n\n```\n@TECHREPORT{umit21kml-tr,\n  AUTHOR =       \"Ibrahim Umit Akgun and Ali Selman Aydin and Aadil Shaikh and Lukas Velikov and Andrew Burford and Michael McNeill and Michael Arkhangelskiy and Erez Zadok\",\n  TITLE =        \"KML: Using Machine Learning to Improve Storage Systems\",\n  INSTITUTION =  \"Computer Science Department, Stony Brook University\",\n  YEAR =         \"2021\",\n  MONTH =        \"Nov\",\n  NUMBER =       \"FSL-21-02\",\n}\n```\n\n```\n@INPROCEEDINGS{hotstorage21kml,\n  TITLE =        \"A Machine Learning Framework to Improve Storage System Performance\",\n  AUTHOR =       \"Ibrahim 'Umit' Akgun and Ali Selman Aydin and Aadil Shaikh and Lukas Velikov and Erez Zadok\",\n  NOTE =         \"To appear\",\n  BOOKTITLE =    \"HotStorage '21: Proceedings of the 13th ACM Workshop on Hot Topics in Storage\",\n  MONTH =        \"July\",\n  YEAR =         \"2021\",\n  PUBLISHER =    \"ACM\",\n  ADDRESS =      \"Virtual\",\n  KEY =          \"HOTSTORAGE 2021\",\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsbu-fsl%2Fkernel-ml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsbu-fsl%2Fkernel-ml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsbu-fsl%2Fkernel-ml/lists"}