[Ilugc] Can we access the SWAP SPACE in Python

  • From: bharathi.list@xxxxxxxxx (Bharathi Subramanian)
  • Date: Fri, 7 Oct 2011 21:04:24 +0800

On Fri, Oct 7, 2011 at 7:46 PM, Arulalan T <arulalant at gmail.com> wrote:

Is there any way to store the data (temporarily) in the SWAP SPACE instead
of RAM ?

I am not sure about SWAP access from program. But you can fine tune
the swap using the /proc/sys/vm/swappiness.

yup. It may be slower to access the swap area rather than RAM, but it is
much faster than access the data of files which are stored in the hard disk.

Swap is in HDD. So much improvement. You can try the mmap option
suggested by Raja. But you need to manage the data handling. Another
option, Create RamFS, load data files into it. So that you can access
it as if from HDD file and get the maximum speed. Remember, RamFS eat
a fixed amount the RAM and handle the data persistence.

Bye :)
-- 
Bharathi Subramanian

Other related posts: