[PR #9602] [MERGED] Set Valkey memory and eviction defaults #8149

Closed
opened 2026-02-26 16:31:57 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/community-scripts/ProxmoxVE/pull/9602
Author: @pshankinclarke
Created: 12/2/2025
Status: Merged
Merged: 12/2/2025
Merged by: @michelroegl-brunner

Base: mainHead: valkey-mem


📝 Commits (2)

📊 Changes

1 file changed (+12 additions, -0 deletions)

View changed files

📝 install/valkey-install.sh (+12 -0)

📄 Description

✍️ Description

This responds to "Enable memory-optimized settings for small-scale deployments" in discussion #3446.

I reserve 25% of container's RAM and use 75% for Valkey (see ElastiCache memory management) by setting maxmemory in valkey.conf (see memory allocation).

I also set cache defaults tuned for small deployments (see https://valkey.io/topics/lru-cache/):

  • maxmemory-policy allkeys-lru
  • maxmemory samples 10

Link: #
discussion #3446

Prerequisites (X in brackets)

  • Self-review completed – Code follows project standards.
  • Tested thoroughly – Changes work as expected.
  • No security risks – No hardcoded secrets, unnecessary privilege escalations, or permission issues.

🛠️ Type of Change (X in brackets)

  • 🐞 Bug fix – Resolves an issue without breaking functionality.
  • New feature – Adds new, non-breaking functionality.
  • 💥 Breaking change – Alters existing functionality in a way that may require updates.
  • 🆕 New script – A fully functional and tested script or script set.
  • 🌍 Website update – Changes to website-related JSON files or metadata.
  • 🔧 Refactoring / Code Cleanup – Improves readability or maintainability without changing functionality.
  • 📝 Documentation update – Changes to README, AppName.md, CONTRIBUTING.md, or other docs.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/community-scripts/ProxmoxVE/pull/9602 **Author:** [@pshankinclarke](https://github.com/pshankinclarke) **Created:** 12/2/2025 **Status:** ✅ Merged **Merged:** 12/2/2025 **Merged by:** [@michelroegl-brunner](https://github.com/michelroegl-brunner) **Base:** `main` ← **Head:** `valkey-mem` --- ### 📝 Commits (2) - [`b2cf9e1`](https://github.com/community-scripts/ProxmoxVE/commit/b2cf9e1d7d04621c32cca4b93ed43a256cce8858) test memory tuning - [`dce557d`](https://github.com/community-scripts/ProxmoxVE/commit/dce557d41687e8db4aab83b63321c1621138e3e3) revert urls to upstream ### 📊 Changes **1 file changed** (+12 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `install/valkey-install.sh` (+12 -0) </details> ### 📄 Description <!--🛑 New scripts must be submitted to [ProxmoxVED](https://github.com/community-scripts/ProxmoxVED) for testing. PRs without prior testing will be closed. --> ## ✍️ Description This responds to "Enable memory-optimized settings for small-scale deployments" in [discussion #3446](https://github.com/community-scripts/ProxmoxVE/discussions/3446). I reserve 25% of container's RAM and use 75% for Valkey (see [ElastiCache memory management](https://docs.aws.amazon.com/AmazonElastiCache/latest/dg/redis-memory-management.html)) by setting `maxmemory` in `valkey.conf` (see [memory allocation](https://valkey.io/topics/memory-optimization/)). I also set cache defaults tuned for small deployments (see https://valkey.io/topics/lru-cache/): - `maxmemory-policy allkeys-lru` - `maxmemory samples 10` ## 🔗 Related PR / Issue Link: # [discussion #3446](https://github.com/community-scripts/ProxmoxVE/discussions/3446) ## ✅ Prerequisites (**X** in brackets) - [X] **Self-review completed** – Code follows project standards. - [X] **Tested thoroughly** – Changes work as expected. - [X] **No security risks** – No hardcoded secrets, unnecessary privilege escalations, or permission issues. --- ## 🛠️ Type of Change (**X** in brackets) - [ ] 🐞 **Bug fix** – Resolves an issue without breaking functionality. - [X] ✨ **New feature** – Adds new, non-breaking functionality. - [ ] 💥 **Breaking change** – Alters existing functionality in a way that may require updates. - [ ] 🆕 **New script** – A fully functional and tested script or script set. - [ ] 🌍 **Website update** – Changes to website-related JSON files or metadata. - [ ] 🔧 **Refactoring / Code Cleanup** – Improves readability or maintainability without changing functionality. - [ ] 📝 **Documentation update** – Changes to `README`, `AppName.md`, `CONTRIBUTING.md`, or other docs. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 16:31:57 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ProxmoxVE#8149
No description provided.