n/aiu/user80 · 2025-09-20
注册 登录
n/ai · 2025-09-20 · 已编辑 · 340 次浏览
u/user80王者

OpenAI Sandbox性能测试

今天才发现ChatGPT有沙盒这个东西,不过既然可以运行Python,那不得不看看它的配置了。

🖥 OpenAI Sandbox

系统环境

操作系统:Linux(内核 4.x)

架构:x86_64

用户权限:普通用户(非 root),不能 apt install / yum install

文件系统:

可用目录:/mnt/data(临时存储,容量约 20GB,会话结束即清空)

不可持久保存


💾 硬件限制

CPU:

逻辑核数:os.cpu_count() 报 56

单核性能中等。

内存:

总内存约 4 GB

可用内存约 3 GB(接近上限会 OOM,被强制终止)

磁盘:

/mnt/data 总 20 GB

可用大约 18 GB

I/O 性能中规中矩,512MB 写入 ~1.2s,读取 ~0.9s

网络:

完全隔离,不可联网。所以很遗憾,这并不可以挂探针或者搭节点。(所以也用不了脚本)

具体配置



==== Sandbox Comprehensive Test Report ====

== 1) System & OS ==
Python: 3.11.8
OS: Linux 4.4.0
Kernel: #1 SMP Sun Jan 10 15:06:54 PST 2016
Arch: x86_64
Logical CPUs: 56
Physical CPUs: 56
Memory: total=4GB, available=3GB, used=0GB
Disk /mnt/data: total=8589934591GB, used=0GB, free=8589934591GB
Open file limit (soft,hard): (1048576, 1048576)
Process PID: 11
Process count: 3

Mounted partitions:

== 2) Environment Variables (subset) ==
PATH=/home/sandbox/.local/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
HOME=/home/sandbox
LANG=C.UTF-8
PWD=/home/sandbox/.openai_internal

== 3) Python Packages ==
numpy: 1.24.0
pandas: 1.5.3
matplotlib: 3.6.3
scipy: 1.14.1
sklearn: 1.1.3
torch: 2.5.1+cpu
PIL: 9.1.0
reportlab: 3.6.12
docx (python-docx): 0.8.11
pptx (python-pptx): 0.6.21

== 4) Performance Microbenchmarks ==
NumPy matmul 800x800: 0.783s
Sort 2,000,000 floats: 0.321s
Pure Python sum of squares 3,000,000: 0.454s (checksum=9313)
Threading (4x500k): 0.271s sum=42131666.22
Multiprocessing (4x300k): 1.419s sum=25278999.73

== 5) External Interpreters Availability ==
python3: AVAILABLE -> Python 3.11.8
python: AVAILABLE -> Python 3.11.8
bash: AVAILABLE -> GNU bash, version 5.2.15(1)-release (x86_64-pc-linux-gnu)
sh: AVAILABLE -> sh: 0: Illegal option --
zsh: NOT FOUND
fish: NOT FOUND
node: NOT FOUND
nodejs: NOT FOUND
deno: NOT FOUND
ruby: NOT FOUND
perl: AVAILABLE -> This is perl 5, version 36, subversion 0 (v5.36.0) built for x86_64-linux-gnu-thread-multi
php: NOT FOUND
lua: NOT FOUND
R: NOT FOUND
Rscript: NOT FOUND
julia: NOT FOUND
go: NOT FOUND
gcc: AVAILABLE -> gcc (Debian 12.2.0-14+deb12u1) 12.2.0
g++: AVAILABLE -> g++ (Debian 12.2.0-14+deb12u1) 12.2.0
javac: NOT FOUND
java: NOT FOUND
rustc: NOT FOUND
cargo: NOT FOUND
dotnet: NOT FOUND
swift: NOT FOUND
scala: NOT FOUND
kotlin: NOT FOUND
tsc: NOT FOUND
npm: NOT FOUND
pip: AVAILABLE -> pip 24.0 from /usr/local/lib/python3.11/site-packages/pip (python 3.11)

再来烤个鸡吧,不能白折腾吧 :xhj001:。

cpu_usage
CPU 30秒烤鸡图
memory_curve
内存压力测试曲线

附:完整测试结果打包(包含PPT,PDF,Word,MD)
sandbox_vps.zip (781.0 KB)

1
11
登录后参与讨论。
u/deleted 广告
海外原生IP VPS,稳定访问全球网络

还在为IP不纯、平台风控、频繁验证而烦恼? 丽萨主机海外原生IP VPS,双ISP住宅IP,覆盖美国、香港、日本、新加坡、台湾、德国、越南、英国等热门地区,适合跨境电商、社媒运营、AI工具、流媒体及海外业务使用。

lisahost.com 了解更多

11 条回复

排序
  1. user80 王者 楼主 钻石会员 2025-09-20

    container_env_info.txt (2.2 KB)
    根据环境变量可判断
    容器类型:极大概率是 Docker/containerd 容器(因为 cgroup 直指容器 ID,格式典型)。
    编排层:可能由 Kubernetes 管理,但在容器内看不到 kubepods,说明外层做了二次隔离或清理。
    隔离技术:可能叠加了 gVisor / Firecracker,因为 CPU 型号被隐藏成 unknown。
    硬件基础:Intel Xeon Broadwell,虚拟化多核环境。

    2
  2. user80 王者 楼主 钻石会员 2025-09-20

    确认了,该沙盒为gVisor 隔离的容器,执行

    print(os.listdir('/proc'))
    

    即可看到

     'cgroups', 'loadavg', 'sys', 'fs', 'irq', 'mounts', 'sentry-meminfo', 
     'filesystems', 'meminfo', 'net', 'self', 'thread-self', '1', '3', '11', '101']
    

    特殊的 sentry-meminfo —— 这是 gVisor 隔离的容器的典型痕迹 ✅。

    1
  3. user80 王者 楼主 钻石会员 2025-09-20

    其中PID 1为Jupyter 的 Docker 容器

    Raw bytes: b'tini\x00--\x00python3\x00-m\x00uvicorn\x00--host\x000.0.0.0\x00--port\x008080\x00--log-config\x00/home/sandbox/uvicorn_logging.config\x00jupyter_server.app:app\x00'
    
    1
  4. user80 王者 楼主 钻石会员 2025-09-20

    沙盒为Jupyter + Uvicorn 的受限容器环境

    ['.ipython', '.bashrc', '.config', 'uvicorn_logging.config',
     '.local', '.bash_logout', '.profile', '.openai_internal', '.cache']
    
    0
  5. 继续这个对话 →
  6. nleis 黄金 2 YEARS 2025-09-20

    这也能挖出来😱

    0