Software Archive
Read-only legacy content
17061 Discussions

Sharing RAM from host to Xeon Phi

Kiswono_P_
Beginner
629 Views

Hi, i have a problem, i have shared Host's RAM as mic0's swap, using these steps http://unix.stackexchange.com/questions/134396/xeon-phi-swap-from-hosts-tmpfs

But why it's so slow when swap is used?

0 Kudos
3 Replies
Frances_R_Intel
Employee
629 Views

I noticed in your post on stackexchange that you said you added the lines "vfs_read_optimization=on" and "vfs_write_optimization=on". to the default.conf file. Hopefully what you actually did was add those two options to the line that started out with ExtraCommandLine. Also, you did not say you ran 'micctrl --resetconfig' after changing the default.conf file. If you did not do this, then please do. Until you run this command the changes you made to default.conf are not actually pushed out to the mpss. I don't think this will help a lot but even so, it should be done. It is my understanding that these two options help with optimizing reads and writes to the ram file systems on the coprocessor. I don't know if they do anything to optimize reads and writes to a ram file system on the host.

As far as why you got the timings you did, I will need to find some experts. But in the meantime, may I ask why you are using ram space on the host rather than disk space? Your post on stack exchange implies you do not have swap set up for the host itself. Is this right? And in your post, you say that the timings are slower than your raid. Have you set up swap space on the raid to compare the timings?

0 Kudos
Kiswono_P_
Beginner
629 Views

I've tried that:

# cat /etc/mpss/default.conf | grep Extra
ExtraCommandLine "highres=off" 
ExtraCommandLine "vfs_read_optimization=on" 
ExtraCommandLine "vfs_write_optimization=on"

# service mpss stop
Shutting down Intel(R) MPSS:                               [  OK  ]
# micctrl --resetconfig
# service mpss start
mic0: online (mode: linux image: /usr/share/mpss/boot/bzImage-knightscorner)

the benchmark result still the same:

Allocated 0.25 GB in 260 ms
Allocated 0.50 GB in 269 ms
Allocated 0.75 GB in 269 ms
Allocated 1.00 GB in 269 ms
Allocated 1.25 GB in 269 ms
Allocated 1.50 GB in 269 ms
...
Allocated 6.75 GB in 269 ms
Allocated 7.00 GB in 260 ms
Allocated 7.25 GB in 470 ms
Allocated 7.50 GB in 1819 ms
Allocated 7.75 GB in 2060 ms
Allocated 8.00 GB in 2420 ms
Allocated 8.25 GB in 2820 ms
Allocated 8.50 GB in 2750 ms

Allocated 8.75 GB in 2300 ms
Allocated 9.00 GB in 1380 ms

 

 

 

 

0 Kudos
Frances_R_Intel
Employee
629 Views

My apologies for taking so long to get back to you. I thought this issue had been answered but I see it has not. 

The paper you referenced on stackexchange (https://software.intel.com/en-us/blogs/2014/01/07/improving-file-io-performance-on-intel-xeon-phi) refers only to reads and writes to the RAM file system on the coprocessor, not on the host. The options "vfs_read_optimization=on" and "vfs_write_optimization=on" apply only to RAM file systems on the coprocessor. The paper measures straight read and write performance, not swap time, not time required to cross the PCIe connection  and not allocation time. So, I'm afraid this is an apples and oranges problem - your result can't be compared to the paper because you are measuring something very different.

0 Kudos
Reply