{"id":17998921,"url":"https://github.com/spiritlhls/addzram","last_synced_at":"2025-06-21T23:35:07.983Z","repository":{"id":190953574,"uuid":"683655595","full_name":"spiritLHLS/addzram","owner":"spiritLHLS","description":"为linux服务器启用zram设备压缩内存 Enable zram device to compress memory for linux servers","archived":false,"fork":false,"pushed_at":"2025-04-25T08:14:00.000Z","size":44,"stargazers_count":17,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-21T23:33:30.174Z","etag":null,"topics":["kvm","linux","zram"],"latest_commit_sha":null,"homepage":"https://t.me/vps_reviews","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spiritLHLS.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"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}},"created_at":"2023-08-27T09:26:21.000Z","updated_at":"2025-04-25T08:14:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"6e4eac2e-c9d4-49a0-8c92-d6c3a5bb422e","html_url":"https://github.com/spiritLHLS/addzram","commit_stats":null,"previous_names":["spiritlhls/addzram"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/spiritLHLS/addzram","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spiritLHLS%2Faddzram","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spiritLHLS%2Faddzram/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spiritLHLS%2Faddzram/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spiritLHLS%2Faddzram/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spiritLHLS","download_url":"https://codeload.github.com/spiritLHLS/addzram/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spiritLHLS%2Faddzram/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261211678,"owners_count":23125542,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["kvm","linux","zram"],"created_at":"2024-10-29T22:09:08.789Z","updated_at":"2025-06-21T23:35:02.954Z","avatar_url":"https://github.com/spiritLHLS.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# addzram\n\n更新时间：2023.08.30\n\n为linux服务器启用zram设备(压缩内存)\n\n```bash\ncurl -L https://raw.githubusercontent.com/spiritLHLS/addzram/main/addzram.sh -o addzram.sh \u0026\u0026 chmod +x addzram.sh \u0026\u0026 bash addzram.sh\n```\n\n类同之前的\n\nhttps://github.com/spiritLHLS/addswap\n\n同样是给机器优化内存占用的东西，只不过zram是压缩内存占用，swap是附加虚拟内存增加内存空间，二者都会占用CPU资源，zram在CPU性能冗余的机器上使用更优\n\n(理论上zram会比swap的性能占用低，但未实际测试过)\n\n### 单位换算：输入 1024 产生 1G 的 zram 设备压缩内存，zram 设备大小最好不要大于实际内存大小\n\n# 致谢\n\n感谢 [@Ella-Alinda](https://github.com/Ella-Alinda) 提供优化建议\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspiritlhls%2Faddzram","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspiritlhls%2Faddzram","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspiritlhls%2Faddzram/lists"}