Joblet is a micro-container runtime for running Linux jobs with: Process and filesystem isolation (PID namespace, chroot) Fine-grained CPU, memory, and IO throttling (cgroups v2) Secure job execution with mTLS and RBAC Built-in scheduler, SSE log streaming, and multi-core pinning Ideal for: Agentic AI Workloads (Untrusted code)
Joblet provides complete process isolation using Linux PID namespaces, ensuring that jobs run in their own isolated process environment with complete separation from the host system.
When you run a job with rnx job run, Joblet:
In the isolated namespace:
Create a job that spawns multiple child processes:
rnx job run --runtime=python-3.11-ml bash -c "sleep 30 & sleep 40 & ps aux"
Output:
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
0 1 1.0 0.1 4364 2916 ? S 05:40 0:00 /usr/bin/bash -c sleep 30 & sleep 40 & ps aux
0 7 0.0 0.0 2792 280 ? S 05:40 0:00 sleep 30
0 8 0.0 0.0 2792 280 ? S 05:40 0:00 sleep 40
0 9 0.0 0.1 7064 2300 ? R 05:40 0:00 ps aux
Process Tree:
Create a more complex job with different types of processes:
rnx job run --runtime=python-3.11-ml bash -c "echo 'Starting processes...' && sleep 60 & echo 'Sleep started' && python3 -c 'import time; [print(f\"Python process {i}\") or time.sleep(1) for i in range(5)]' & echo 'Python started' && ps aux && echo 'Waiting for processes...' && wait"
Process Tree Shows:
Create processes and wait for them to complete:
rnx job run --runtime=python-3.11-ml bash -c "(sleep 10; echo 'Child 1 done') & (sleep 15; echo 'Child 2 done') & echo 'Both children started' && ps aux && wait && echo 'All processes completed'"
This demonstrates:
waitps, top, etc.ps, kill, jobs, waitAll standard Linux process management commands work within the isolated namespace:
# View all processes in your job
rnx job run --runtime=python-3.11-ml ps aux
# Monitor processes in real-time
rnx job run --runtime=python-3.11-ml top
# Create background processes
rnx job run --runtime=python-3.11-ml bash -c "long-running-task &"
# Wait for background processes
rnx job run --runtime=python-3.11-ml bash -c "background-task & wait"
# Kill specific processes (by PID within namespace)
rnx job run --runtime=python-3.11-ml bash -c "sleep 60 & kill %1"
Joblet achieves process isolation through:
exec to replace init with job command/proc to show only namespace processes| Feature | Joblet | Traditional Containers |
|---|---|---|
| Process becomes PID 1 | ✅ | ✅ |
| Child process visibility | ✅ | ✅ |
| Host process isolation | ✅ | ✅ |
| Standard process tools | ✅ | ✅ |
| Resource limits | ✅ | ✅ |
| Network isolation | ✅ | ✅ |
| Lightweight execution | ✅ | ❌ |
| No image management | ✅ | ❌ |
Always ensure child processes are cleaned up:
# Good: Wait for all background processes
rnx job run --runtime=python-3.11-ml bash -c "task1 & task2 & wait"
# Good: Trap signals for cleanup
rnx job run --runtime=python-3.11-ml bash -c "trap 'kill $(jobs -p)' EXIT; task1 & task2 & wait"
Monitor process resource usage:
# Monitor memory and CPU usage
rnx job run --runtime=python-3.11-ml bash -c "memory-intensive-task & top -p \$!"
Handle process failures gracefully:
# Check background process status
rnx job run --runtime=python-3.11-ml bash -c "risky-task & wait \$! || echo 'Task failed'"
Process isolation provides strong security boundaries:
This ensures complete process-level security between jobs and from the host system.