I want to randomly access the elements of a large array (>7GB) that I load into Python as a either an HDF5 dataset (h5py.Dataset), or a memory-mapped array (numpy.memmap).
If this file lives on an spinning-platter HD, these random accesses take forever, for obvious reasons.
Is there a way to check (assert) that the file in question lives on an SSD, before attempting these random accesses?
I am running python in Linux (Ubuntu 14.04). I don't mind non-cross-platform solutions.