Resource Limits

Configure cGroup limits for CPU, memory, IO, and process management.

Resource Limits Configuration Configuring global and plan-based resource limits using cGroups v2.

Understanding cGroups v2

Simuzo uses Linux cgroups v2 (control groups) for resource management. cGroups v2 provides a unified hierarchy for managing system resources with improved isolation and accounting.

cGroups Hierarchy

/sys/fs/cgroup/simuzo/          # Main resource limits
/sys/fs/cgroup/simuzo-db/       # Database-specific limits

Resource Controllers

ControllerFileDescription
CPUcpu.maxCPU time quota (percentage)
Memorymemory.maxMaximum memory allocation
Memory Highmemory.highThrottling threshold
IO Readio.maxRead bandwidth and IOPS
IO Writeio.maxWrite bandwidth and IOPS
PIDspids.maxMaximum process count

Accessing Resource Limits

Navigate to SettingsResource Limits in the Admin Panel.

Enabling cGroups v2

1

Check System Support

Verify cgroups v2 is available:

grep cgroup2 /proc/filesystems
2

Enable in Simuzo

Click Enable cGroups v2 if not already enabled.

3

Monitor Progress

View task logs for the enablement process.

Requirements

Limit Types

CPU Quota

Limits the percentage of CPU time a user can consume:

SettingRangeDefaultDescription
CPU Quota25-100%100%Percentage of total CPU

Formula: CPU Quota = quota microseconds / period microseconds * 100

Example: 25% = 25000 / 100000

Memory Limits

SettingMinimumDescription
Memory Max128MHard limit - process killed if exceeded
Memory High128MSoft limit - throttling begins here

Set Memory High below Memory Max to enable graceful throttling.

IO Bandwidth

SettingMinimumFormatDescription
IO Read Bandwidth256KValue + suffixMaximum read speed
IO Write Bandwidth256KValue + suffixMaximum write speed

Supported suffixes: K (Kilobytes), M (Megabytes), G (Gigabytes), T (Terabytes)

IOPS Limits

SettingMinimumDescription
IOPS Read Max256Read operations per second
IOPS Write Max256Write operations per second

Process Limits

SettingMinimumDescription
Tasks Max10Maximum concurrent background tasks
Entry Processes1Maximum concurrent connections (EP)

Plan-Based Limits

Resource limits can be assigned based on hosting plans:

Default Plan (SIMUZO_DEFAULT)

Fallback limits applied when no custom or plan limits exist.

Custom Plans

Create plan-specific limits in the panel software (Webuzo, Plesk, cPanel).

Viewing Current Limits

Check active limits for a user:

# View CPU limits
cat /sys/fs/cgroup/simuzo/{username}/cpu.max

# View memory limits
cat /sys/fs/cgroup/simuzo/{username}/memory.max
cat /sys/fs/cgroup/simuzo/{username}/memory.high

# View IO limits
cat /sys/fs/cgroup/simuzo/{username}/io.max

# View PID limits
cat /sys/fs/cgroup/simuzo/{username}/pids.max

CLI Management

Manage resource limits via CLI:

# Reload configuration
wcli --reload

# Enable cgroups v2
wcli --enable-cgroups-v2

Troubleshooting

cGroups v2 Not Available

  1. Check kernel version: uname -r
  2. Verify cgroups mounted: mount | grep cgroup
  3. Enable in GRUB if needed

Limits Not Applied

  1. Check user cgroup exists: ls /sys/fs/cgroup/simuzo/
  2. Verify limits in Simuzo settings
  3. Check logs: /var/simuzo/logs/simuzo.log
Live Monitoring View real-time resource usage in StatisticsCurrent tab.

Related Topics