It is not enough to just change the system limits as shown in the preceding section. The Linux kernel actually uses the /dev/shm device as an in-memory backing store for shared memory. We can find out the size of the device using the regular df command:
At the current state, the /dev/shm device is unused as shown in the preceding. The overall size of the block device is 16 GiB. As an exercise, let's now open a Julia REPL and create SharedArray:
Re-running the df command, we can see that /dev/shm is now used:
Now that we know SharedArray uses the /dev/shm device, how can we increase the size to accommodate our problem, which requires more than 22 GiB? It can be done using the mount command with a new size:
The size of /dev/shm is now clearly shown as 28G.