Commit 31bbb10
committed
Default DuckDB memory_limit to the job's allocation, not physical RAM
configureOutOfCore() set memory_limit only when the user configured it,
so DuckDB fell back to its own default of 80% of *physical* RAM. That
ignores a SLURM / cgroup allocation and over-commits: a large out-of-core
aggregation (e.g. rowDeviances' ~27.9M-group per-cell GROUP BY) nearly
OOMs on the first scan instead of spilling within the allocation.
When neither DuckDBDataFrame.memory_limit nor BIOCDUCKDB_MEMORY_LIMIT is
set, default memory_limit to 80% of the most-restrictive detected ceiling:
a SLURM allocation (SLURM_MEM_PER_NODE, or SLURM_MEM_PER_CPU times
SLURM_CPUS_ON_NODE), the cgroup limit (v2 memory.max then v1
memory.limit_in_bytes), then physical RAM (/proc/meminfo). Nothing
detected (e.g. macOS) leaves DuckDB's default in place; an explicit
option/env var still overrides.
- R/DuckDBConnection.R: .slurmMemoryBytes/.cgroupMemoryBytes/
.physicalMemoryBytes/.defaultMemoryLimit; wire into configureOutOfCore; docs
- DESCRIPTION, NEWS.md: 0.99.101 parent 2bbfd0d commit 31bbb10
4 files changed
Lines changed: 112 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
1 | 15 | | |
2 | 16 | | |
3 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
71 | 81 | | |
72 | 82 | | |
73 | 83 | | |
| |||
195 | 205 | | |
196 | 206 | | |
197 | 207 | | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
198 | 282 | | |
199 | 283 | | |
200 | 284 | | |
201 | 285 | | |
202 | 286 | | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
203 | 290 | | |
204 | 291 | | |
205 | 292 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments