Ask Ubuntu Asked by Aadithya Sathya on December 12, 2020
I am programming in python containing numpy array sizes of 200 million for one of my machine learning projects.
During the execution of the program the swap memory is also getting utilized for which I have created enough swap partition (Around 40GB)
I would like to extend my swap partition by creating a swap file. I have a doubt whether the read and write speed of the swap file will be slower than the swap partition ?
Looking forward for some replies on the same
Thanks
Aadithya
Once in place, a swap file is used the same way as a swap partition. Through the swap file or swap partition, the kernel knows which sectors are allocated for this use, and uses this space for swapping memory. As such, there fundamentally will be no difference in performance.
A swap file, however, may be fragmented. That would degrade performance on a traditional hard drive, but less so on an SSD.
Correct answer by vanadium on December 12, 2020
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP