user3761809
user3761809

Reputation: 111

Bind tmpfs or ramfs to a specific memory node

I'm working on a NUMA server which has two memory nodes.

I want to create a file system which will be loaded in main memory like tmpfs or ramfs and I want to bind it to a specific memory node. In other words I don't want the ramfs contents to be interleaved across the two memory nodes.

So how can I achieve this?

I have tried the numactl command with the --file option but it seems to work only for single files (I need to load a directory).

thanks

Upvotes: 5

Views: 2187

Answers (1)

user3761809
user3761809

Reputation: 111

I found out that the mpol option of the mount command does what I want.

For example the command:

mount -t tmpfs -o size=4g,mpol=bind:0 tmpfs pathToTheDir

will create a 4GB filesystem which will be allocated on memory node 0

Upvotes: 4

Related Questions