0

I teach programming to students in a school where they can all login to any computer; their session files being carried by a common NFS server. We experience very slow execution times when we use demanding tools (namely VSCode, Android Studio or other frameworks like Symfony or React). Asking the students to work in local directory like /tmp is a good workaround but kind of sad as well.

I am not sysadmin but I would love some insights about what could go wrong here:

  1. Are there common pitfalls that we need to check when it comes to sharing session files on NFS?
  2. Consider we have about 100 students working simultaneously, my understanding is that the performance of the upstream SSD will be highly divided anyway, so do you consider this kind of architecture viable?
  3. For many other reasons, I suggest we switch them to laptops, if you take the cost aspects appart, is it more reasonable choice?
2
  • One thing that may bite you, is that NFS doesn't do inotity, so watching for changes in files has to use a slower method. I don't know how vscode deals with that.
    – Halfgaar
    Mar 25, 2023 at 11:58
  • Have you considered having them checkout out their files to a local machine using a distributed revision control system, like git? Then they can check their files into the central server as necessary. I think a local mounted disk like /tmp would be reasonable in this situation.
    – Juan
    May 17, 2023 at 15:38

1 Answer 1

0

Giving answers to your questions requires a deeper understanding of your workload and bottleneck. So as a first step you should profile your NFS server to understand which kind of load it faces and why it slow down.

Without such information, I can provide only general advice:

  • the applications you described (eg: Android Studio) use many tiny files. This access pattern can be very sensitive to metadata overhead, so you should explore the various data and metadata caching facility of NFS client (ie: ac). Anyway, be sure to read and understand how caching and other optimizations can affect data coherency by reading the nfs man page
  • to more easily absorb random writes you can explore the async NFS server option, at least for some testing. Be aware that this can lead to data loss, so be sure to understand its implications. Again, please read the relevant man page
  • during high load, use iostat -x to check your server disks utilization and latency. Maybe you are "just" short of hardware resources

Anyway, high-performance NFS is not a simple setup by any means. You probably need a skilled sysadmin if you want such a setup to perform well.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .