Closed wlandau closed 1 week ago
The problem is probably NFS. How fast is this?
ps::ps_disk_partitions()
A couple milliseconds on NFS:
> microbenchmark::microbenchmark(ps::ps_disk_partitions())
Unit: milliseconds
expr min lq mean median uq max
ps::ps_disk_partitions() 1.857288 1.910587 2.009274 1.938773 1.977369 3.923788
neval
100
How about ps::ps_disk_usage()
?
Same thing, ps::ps_disk_usage()
is just under 2ms on my company's NFS RHEL7 setup.
After #176, you can call ps_fs_mount_point()
to get the mount point for any (existing) file or directory, and then you can match that to the mountpoint
column of ps_disk_partitions()
to get the fs type. This should be much faster.
I can speed up ps_fs_info()
a bit, but it is never going to be as fast as ps_fs_mount_point()
. It is always going to be slow on (some?) NFS systems, I am afraid.
Thanks, @gaborcsardi!
@wlandau If you can confirm that this works for you, I'll make a ps release.
Both approaches we discussed work beautifully. https://github.com/ropensci/targets/pull/1326 uses ps_fs_mount_point()
+ ps_disk_partitions()
, and it is working reliably and fast.
On that RHEL 7 machine, I am noticing slowness in
ps_fs_info()
. Do you know of a workaround to make it pretty much instantaneous on these old machines?