Hot answers tagged

10

You cannot dedicate swap for a software. What you can do is create a shell script that creates a swap, start MATLAB, and delete the swap when MATLAB exits. Here's an example script which creates a swap of 10Mb in the /tmp directory, mounts it, starts R (I don't have matlab), wait R exits, umount the swap file and delete it. Please note that: - you will ...


3

EDIT: Children in bed, now here comes the extended edition. SWAP (do you need it?) Well, basically you don't. BUT, if you got none, you really have to make sure that your 32GB of RAM is enough for the summed up RAM consumption of all running processes. If you don't the kernel will kill processes at its own gusto. Why are there two SWAP partitions? This ...


2

I have found a solution with help from "steeldriver" Problem: My problem was that i run forever start myscript.js with user root, forever save all logs in folder of the user that run the script, that is why i have no space in /dev/md1 Solution: move all files that was in /root/.forever to my new user, /home/user/.forever and run forever start myscript.js ...


2

This will show the number of open files per process ID: cd /proc for processid in [0-9]* do echo "Process ID = $processid: $(ls /proc/$processid/fd/ | wc -l) file descriptors" done (save and execute with sudo). Then you can track down what that process ID belongs to.


1

OK, quite a list you have there. Let me respond inline How to Apply the Better Error-handling of Error trapping here? See my script for the example in the source. Thread How to Do Error-trapping and Swapoff if Error/Warning?. I don't like the concept of this script at all. That you have an external harddrive that you're trying to use as swap is just a ...


1

This is how you can expand your SWAP memory using an external hard drive: First, write down your actual SWAP memory by running: free -m Second, have at hand the folder of your HDD. It should be something like /media/myhdd. Decide the size of extra SWAP you want to add. Let's say, X GB. Calculate the amount of bytes that quantity is. Using GB, this is: Y=...


1

I don't really know much about Matlab but it looks to me like others have solve your problem by having Matlab use it's own page file. It might be worth you trouble to check out the thread on stckoverflow HERE


1

The basic steps of how to create a swap file are described in Arch Wiki article on swap. I took the liberty of condensing all those steps into a script。 Basic usage: sudo bash addswap.sh INTEGER where INTEGER is how much swap size you want to add (in megabytes). Script Source Also posted as gist on github。 #!/bin/bash USERID=$( id -u ) if [ $...



Only top voted, non community-wiki answers of a minimum length are eligible