For example, I’m running 16 queries that use a lot
of CPU (they do time series expansion and some arithmetics). I
estimate they will generate a maximum of 2.5 billions of rows.
Those queries are running since 48 hours and don’t know when
they will finish, but RAM never overpassed those 24GB (+ some
system).
top - 10:54:19 up 2 days, 1:37, 1 user,
load average: 16.00, 16.00, 16.00
Tasks: 347 total, 17 running, 330
sleeping, 0 stopped, 0 zombie
%Cpu(s):100.0 us, 0.0 sy, 0.0 ni, 0.0
id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 98847584 total, 48442364 free,
30046352 used, 20358872 buff/cache
KiB Swap: 15825916 total, 15825916 free,
0 used. 67547664 avail Mem
PID USER PR NI VIRT RES
SHR S %CPU %MEM TIME+ COMMAND
9686 postgres 20 0 24.918g 214236
12628 R 100.0 0.2 2872:38 postgres
9687 postgres 20 0 24.918g 214212
12600 R 100.0 0.2 2872:27 postgres
9688 postgres 20 0 25.391g 709936
12708 R 100.0 0.7 2872:40 postgres
9691 postgres 20 0 24.918g 214516
12900 R 100.0 0.2 2865:23 postgres
9697 postgres 20 0 24.918g 214284
12676 R 100.0 0.2 2866:05 postgres
9698 postgres 20 0 24.922g 218608
12904 R 100.0 0.2 2872:31 postgres
9699 postgres 20 0 24.918g 214512
12904 R 100.0 0.2 2865:32 postgres
9702 postgres 20 0 24.922g 218332
12628 R 100.0 0.2 2865:24 postgres
9704 postgres 20 0 24.918g 214512
12904 R 100.0 0.2 2872:50 postgres
9710 postgres 20 0 24.918g 212364
12904 R 100.0 0.2 2865:38 postgres
9681 postgres 20 0 24.918g 212300
12596 R 99.7 0.2 2865:18 postgres
9682 postgres 20 0 24.918g 212108
12656 R 99.7 0.2 2872:34 postgres
9684 postgres 20 0 24.918g 212612
12908 R 99.7 0.2 2872:24 postgres
9685 postgres 20 0 24.918g 214208
12600 R 99.7 0.2 2872:47 postgres
9709 postgres 20 0 24.918g 214284
12672 R 99.7 0.2 2866:03 postgres
9693 postgres 20 0 24.918g 214300
12688 R 99.3 0.2 2865:59 postgres
9063 postgres 20 0 24.722g 14812
12956 S 0.3 0.0 0:07.36 postgres
9068 postgres 20 0 24.722g 6380
4232 S 0.3 0.0 0:02.15 postgres
9065 postgres 20 0 24.727g 10368
3516 S 0.0 0.0 0:04.24 postgres
9066 postgres 20 0 24.722g 4100
2248 S 0.0 0.0 0:06.04 postgres
9067 postgres 20 0 24.722g 4100
2248 S 0.0 0.0 0:01.37 postgres
9069 postgres 20 0 161740 4596
2312 S 0.0 0.0 0:04.48 postgres