Release build of a large program needs more than 90 GB in scriptc-llvm-codegen, with no thread or memory limit
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 22/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- compilers, performance
Hướng nghiên cứu
This is a memory-profiling and design task, not a one-file edit. Start by reproducing the failure with the reported command on a large TypeScript program under a memory cap, then read the scriptc-llvm-codegen helper to find where it spawns one compile thread per hardware thread; the cached .bc/.o partitions under ~/.cache/scriptc/build/native-v1/partitions/<hash>/ show what a release partition produces. A first deliverable is a --jobs flag or SCRIPTC_CODEGEN_JOBS env var threaded through scriptc build, plus measurements of peak memory per thread at 4, 8 and 32 jobs. Done means the cap holds at a documented thread count and the option is in scriptc build --help.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
A release build of a large program needs more than 90 GB of memory in scriptc-llvm-codegen, and there is no setting to lower its parallelism.
The program is the Paseo CLI (TypeScript; zod, commander and a WebSocket client among its dependencies), built on Linux x86-64 with 32 hardware threads and 123 GB of RAM:
scriptc build index.ts -o paseo --optimization release --no-keep-llvm --node-islands=off
Each build ran alone under a systemd memory cap (MemoryMax, MemorySwapMax=0), scriptc 0.4.10:
| Optimization | Cap | Result |
|---|---|---|
| dev | 40 GB | killed |
| dev | 48 GB | built in 8 min |
| release | 32 GB | killed |
| release | 60 GB | killed, both with 32 CPUs and with 8 CPUs |
| release | 90 GB | killed in scriptc-llvm-codegen after 13 min, with 4 h 50 min of CPU time |
The release cache directory (~/.cache/scriptc/build/native-v1/partitions/<hash>/) holds 191 .bc and 202 .o files, 3.4 GB in total, after these attempts.
The helper starts one compile thread per hardware thread. I have not measured how the peak splits between threads; the 8 CPU run at 60 GB failed too, so the thread count may not be the whole cause. I found no option, in scriptc build --help or in the helper, that limits threads or memory.
Requests:
- A way to set the number of codegen threads, for example
--jobsorSCRIPTC_CODEGEN_JOBS, so a build can trade time for memory. - If a release partition is expected to need several GB, a peak memory that does not grow with the thread count.
I can run a build with extra logging or a different scriptc version if that helps.
- Ngôn ngữ chính
- TypeScript
- Star
- 6.6k
- Fork
- 216
- Merge trung bình
- 9 giờ 35 phút
- Pull request đã merge (30 ngày)
- 775
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của vercel-labs/scriptc
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
vercel-labs/scriptc#3979 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Support undici 8.x request() through the built-in implementationCó thể đã có người làm @younggglcy đã nhận 1 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
vercel-labs/scriptc#3894 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
A native program crashes with SIGSEGV when a string or JSON builder grows past 4 MiBCó thể đã có người làm @alantriesagain đã nhận 5 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 22/100
vercel-labs/scriptc#3642 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
vercel-labs/scriptc#3605 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Native CLI (scriptc.exe) segfaults on a large program that the same release compiles under NodeĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 12/100
vercel-labs/scriptc#3595 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của vercel-labs/scriptc
Issue tương tự
-
truapi-release
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
paritytech/product-sdk#529 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Environments table lists page size 5 after 30Có thể đã có người làm @raus7n đã nhận hôm nay. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
litmuschaos/litmus#5743 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
desktop grp:admin-donors type:graphics-bug ui-admin
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
milind-soni/OpenMausBot#6730 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Status: Triage Type: Bug / Error
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 69/100
mermaid-js/mermaid-v13#1059 ·
Maintainer thường phản hồi trong vòng 1 ngày