added correct commands and removed duplicate stress functions

This commit is contained in:
2026-05-22 20:16:30 +03:00
parent d80cb3e1a7
commit d4e700f980
5 changed files with 48 additions and 112 deletions
+30 -4
View File
@@ -19,16 +19,42 @@ bash creation_time_experiment/bash_test_iter.sh
bash thread_recursive_scaling/run_thread_recursive.sh
```
Enable the dangerous stress tests (timeboxed):
Enable the dangerous stress test (timeboxed):
```sh
ALLOW_DANGEROUS=1 FORK_BOMB_SECONDS=5 MAX_LIMIT_SECONDS=5 bash run_all_experiments.sh
ALLOW_DANGEROUS=1 FORK_BOMB_SECONDS=5 bash run_all_experiments.sh
```
## Key Commands for lifting linux kernel restrictions on alpine linux for threads & processes:
```
# Lift shell nproc limit
ulimit -u unlimited
# Raise kernel PID/thread caps (temporary until reboot)
sysctl -w kernel.pid_max=131072
sysctl -w kernel.threads-max=131072
# cgroup v2 setup (Alpine Linux)
mkdir -p /sys/fs/cgroup/test
echo max > /sys/fs/cgroup/test/pids.max
echo $$ > /sys/fs/cgroup/test/cgroup.procs
```
## Clean-up commands run after tests:
```
# Cleanup to make it non-persistent (move out, then delete)
echo $$ > /sys/fs/cgroup/cgroup.procs
rmdir /sys/fs/cgroup/test
```
## Potential dangers
- The fork bomb and max-limit stress tests can freeze your machine or make it
unresponsive by exhausting processes/threads.
- The fork bomb can freeze your machine or make it unresponsive by exhausting
processes/threads.
- You may need elevated limits (ulimit or sysctl) to run high-stress tests.
- Running heavy tests on shared systems or laptops can disrupt other users and
risk data loss if the system becomes unstable.