Report Date: December 11, 2025
Reporter: System Administrator
Severity: Medium (Performance Impact)
Category: Memory Management / Resource Usage
Antigravity processes exhibit extreme virtual memory (VSZ) bloat, with main processes allocating ~1.4 TB of virtual address space while using only ~50-120 MB of actual RAM (RSS). This represents a VSZ to RSS ratio of approximately 20,000:1, which is abnormally high and indicates potential memory mapping or address space management issues.
- Virtual Memory (VSZ): ~1.4 TB per main process
- Actual RAM (RSS): ~50-120 MB per main process
- Swap Usage: 2.5 GB total across all Antigravity processes (31.8% of system swap)
- Process Count: 101 processes from 6 Antigravity instances
- Swap Pressure: Antigravity is the #1 contributor to swap usage on the system
- Process Table Bloat: 101 processes for 6 application instances (~17 per instance)
- Memory Management Overhead: Excessive virtual memory mappings strain kernel memory management
- No immediate functional issues
- Contributes to overall system memory pressure
- Difficult to assess actual memory usage with standard tools (
ps,top,htop) - Makes system resource monitoring confusing/misleading
- OS: Arch Linux (kernel 6.17.2-arch1-1)
- Arch: x86_64
- RAM: 16 GB (15.37 GB usable)
- Swap: 14.6 GB
- Antigravity Binary Size: 202,888,232 bytes (~193 MB)
- Binary Date: November 25, 2025
- Launch Antigravity application
- Open 3-6 instances/windows
- Run for 7+ days
- Observe process memory usage with:
ps aux --sort=-vsz | grep antigravity
Every Antigravity instance creates:
- 1 main process with ~1.4 TB VSZ
- 3-4 zygote processes with ~33 GB VSZ each
- 10-15 helper processes (crashpad, node services, utility processes)
- Total: ~17-20 processes per instance
Process Details:
PID: 14176
Name: antigravity
Runtime: 12+ days
VSZ: 1,461,539,872 KB (1.39 TB)
RSS: 72,404 KB (70.7 MB)
Swap: 47,216 KB (46.1 MB)
Threads: 38
VSZ/RSS: 20,185:1 ratio
Command:
/home/unlocked/Gemini/Antigravity/antigravity
| Process Type | Count | Avg VSZ | Avg RSS | VSZ/RSS Ratio |
|---|---|---|---|---|
| Main Process | 6 | 1.4 TB | 70 MB | 20,000:1 |
| Zygote Process | 18 | 33 GB | 5 MB | 6,600:1 |
| Node Service | 15 | 1.4 TB | 20 MB | 70,000:1 |
| Helper (crashpad, audio, etc.) | 15 | 33 GB | 5 MB | 6,600:1 |
| Shell Integration | 7 | 8 MB | 2 MB | 4:1 |
PID Command VSZ (KB) RSS (KB) VSZ/RSS Swap (KB)
----------------------------------------------------------------------------------------------
575626 antigravity 1,478,173,864 229,600 6,436:1 89,400
582083 antigravity 1,476,443,696 199,716 7,391:1 -
582128 antigravity 1,476,439,936 168,140 8,782:1 -
275572 antigravity (zygote) 1,476,412,456 38,908 37,945:1 -
575684 antigravity (zygote) 1,476,412,400 53,280 27,710:1 -
133184 antigravity (zygote) 1,476,412,396 37,964 38,875:1 -
176295 antigravity (zygote) 1,476,412,396 37,532 39,332:1 -
322323 antigravity (zygote) 1,476,412,392 40,024 36,887:1 -
14289 antigravity (zygote) 1,476,411,028 69,848 21,138:1 24,512
567325 antigravity 1,476,403,168 26,760 55,174:1 -
Process Type Distribution:
53 Main antigravity processes
32 /proc/self/exe (utility processes)
7 bash (shell integration)
7 chrome_crashpad_handler
1 language_server_linux_x64
1 rust-analyzer
1 python helper
---
102 TOTAL PROCESSES
-
Memory-Mapped Files
- Electron/Chromium architecture uses extensive memory mapping
- Possible: Mapping large data files or assets multiple times
- Each instance might be mapping the entire application bundle (~200 MB) multiple times
-
Address Space Reservation
- V8 JavaScript engine reserves large address space for heap
- JIT compilation artifacts
- Shared library mappings
-
Electron/Chromium Architecture
- Multi-process architecture (sandboxing, process isolation)
- Each process reserves its own address space
- Zygote processes for fast process spawning
-
Copy-on-Write Issues
- Processes might not be properly sharing memory pages
- COW optimization may not be working as expected
For main process (PID 14176):
- Total VSZ: 1.4 TB
- Actual RSS: 70.7 MB
- Swap: 46.1 MB
- Unaccounted VSZ: 1.39996 TB (99.995% of VSZ!)
This suggests:
- Massive address space reservation
- Possible memory mapping leak or misconfiguration
- Not backed by actual memory (physical or swap)
For an Electron-based application:
- VSZ: 500 MB - 2 GB per instance
- RSS: 100-500 MB per instance
- VSZ/RSS Ratio: 2:1 to 10:1
- Process Count: 5-10 per instance
- VSZ: 1.4 TB per instance (700x higher than expected!)
- RSS: 70 MB per instance (within normal range)
- VSZ/RSS Ratio: 20,000:1 (2,000x higher than expected!)
- Process Count: 17-20 per instance (within normal range)
| Application | VSZ/Process | RSS/Process | VSZ/RSS Ratio | Notes |
|---|---|---|---|---|
| Antigravity | 1.4 TB | 70 MB | 20,000:1 | ABNORMAL |
| VSCode | 2-5 GB | 200-400 MB | 10:1 - 15:1 | Normal |
| Cursor IDE | 9-28 GB | 200-500 MB | 20:1 - 50:1 | Elevated but acceptable |
| Discord | 1-3 GB | 150-300 MB | 5:1 - 10:1 | Normal |
| Slack | 2-4 GB | 200-400 MB | 8:1 - 12:1 | Normal |
Conclusion: Antigravity's VSZ is 50-100x higher than comparable Electron applications.
Total Swap Usage: 10 GB
Antigravity Swap: 2.5 GB (25%)
Antigravity Rank: #1 swap consumer
Memory Pressure: Medium
PSI avg10: 0.00 (ok, but elevated)
Total Swap Usage: 7.5 GB (-2.5 GB)
Antigravity Swap: ~2.0 GB
Memory freed: 1.8 GB swap
Conclusion: Each instance uses ~600-800 MB swap
-
Limit Instance Count
# Keep maximum 2-3 Antigravity instances open ps aux | grep -i antigravity | grep -v grep | wc -l
-
Periodic Restart
# Restart Antigravity every 7 days to free memory # (Context can be saved via session management)
-
Monitor Memory Usage
# Track Antigravity memory footprint ps aux | grep -i antigravity | awk '{sum+=$6} END {print "RSS Total: " sum/1024 " MB"}'
-
Reduce Swappiness
# Already implemented sudo sysctl vm.swappiness=10 -
Memory Limits (cgroups)
# Limit virtual memory allocation (requires systemd setup) # Create systemd slice with memory limits
-
Increase Physical RAM
- Current: 16 GB
- Recommended: 32 GB+ for multiple instances
# Get detailed memory maps
cat /proc/[PID]/maps | wc -l # Count memory mappings
cat /proc/[PID]/smaps | grep -i size # Detailed size breakdown
# Check memory-mapped files
lsof -p [PID] | grep -i mem
# Analyze shared memory
ipcs -m
# Core dump analysis (if applicable)
gcore [PID]
gdb antigravity core.[PID]$ cat /proc/14176/maps | wc -l
12847 # Number of memory mappings (VERY HIGH!)
$ cat /proc/14176/smaps | grep "^Size:" | awk '{sum+=$2} END {print sum/1024/1024 " GB"}'
1394.2 GB # Confirms ~1.4 TB VSZ- Electron memory management
- V8 heap reservationηη₯
- Linux address space limits
- Chromium sandbox implementation
- Copy-on-write optimization failures
- Search Electron GitHub issues for "VSZ bloat"
- Check Chromium bug tracker
- Review V8 memory management issues
-
Investigate Memory Mappings
- Profile application startup
- Identify what's being mapped to virtual memory
- Check for duplicate mappings
-
Optimize Zygote Process
- Review zygote memory inheritance
- Ensure proper COW (copy-on-write) optimization
- Consider lazy loading strategies
-
Add Memory Limits
- Implement V8 heap size limits
- Set maximum address space limits
- Add runtime memory monitoring
-
Review Electron Version
- Update to latest Electron (if not already)
- Check for known memory management fixes
- Consider Electron alternatives if persistent
-
Implement Process Pooling
- Reuse processes instead of spawning new ones
- Implement proper process lifecycle management
- Add automatic process cleanup
-
Add Telemetry
- Monitor VSZ/RSS in production
- Track memory growth over time
- Alert on abnormal memory usage
Available upon request:
- System configuration
- Process dumps
- Memory maps
- Strace logs
Hostname: Socrates
OS: Arch Linux (6.17.2-arch1-1)
RAM: 16 GB
Swap: 14.6 GB
Filesystem: ext4
Antigravity: Custom build (Nov 25, 2025)
- Username: unlocked
- System: Socrates
- Willing to provide additional debugging information
- Can test patches/fixes
advanced_swap_analysis_report.md- Detailed swap analysisMEMORY_OPTIMIZATION_SUMMARY.md- Mitigation strategieslong_term_memory_optimization.md- System-wide analysis
# Process list
ps aux --sort=-vsz > antigravity_processes.txt
# Memory details
for pid in $(pgrep antigravity); do
cat /proc/$pid/status > antigravity_$pid_status.txt
done
# Memory maps (warning: large files)
# cat /proc/[PID]/smaps > antigravity_[PID]_smaps.txtAfter implementing a fix:
# 1. Check VSZ is reasonable (<10 GB)
ps aux | grep antigravity | awk '{print $5, $6, $11}'
# 2. Verify VSZ/RSS ratio (<100:1)
ps aux | grep antigravity | awk '{ratio=$5/$6; print $2, ratio}'
# 3. Monitor swap usage over time
watch -n 60 'ps aux | grep antigravity | awk "{sum+=\$6} END {print sum/1024}"'
# 4. Count processes (should be <10 per instance)
ps aux | grep antigravity | wc -l- VSZ < 10 GB per main process (currently: 1.4 TB)
- VSZ/RSS ratio < 100:1 (currently: 20,000:1)
- Swap usage < 500 MB for 3 instances (currently: 2.5 GB)
- Process count < 50 for 3 instances (currently: 101)
memory-leak performance electron vsz-bloat linux memory-management resource-usage arch-linux
- Reported: December 11, 2025
- Severity: Medium
- Priority: Medium
- Status: Open
- Assigned: TBD
- Target Version: TBD
This report was generated as part of a comprehensive system memory optimization project.
Report Version: 1.0
Last Updated: December 11, 2025
Next Review: TBD