Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am coming into an environment where they are using NFS to access PHP scripts and static web content that is stored on a server that is on the same network as the front end Apache server. Only one front end Apache server is accessing these files over NFS so it isn't a situation where they are load balancing the front end Apache boxes.

We are in the process of virtualizing the Apache and NFS servers. We are in disagreement over if it makes sense to still be using NFS in this situation or just having all the web content stored locally on the same machine as the web server. What do you all think?

Thanks for any input.

share|improve this question

You only need NFS if you need multiple-client access at a filesystem level. Since you don't need multiple-client access, I really wouldn't recommend NFS as the best choice.

Even if you do have multiple Apache servers, I still wouldn't recommend using NFS as the means of sharing your code between machines. Automated deployment tools can easily distribute code to as many locations as you like near-simultaneously. NFS might be the best choice for user-provided assets, but that's still not as cut-and-dried as it might initially appear (my opinions on this topic are available in this other answer).

share|improve this answer

We're currently running nginx & Apache serving data from an NFS share on a NetApp FAS2050 with no performance issues. The drawback of NFS seems to be that directory lookups of relatively large directories (> 200 files) is quite slow, I'd recommend that you put nginx as a cache in from of that Apache server for the least performance impact on the SAN.

share|improve this answer
Bollocks it doesn't cache [] – petertonoli Aug 7 '11 at 9:39

It sounds like in the situation you've presented, that there would be very little benefit from using NFS in this scenario.

You would get the most benefit from a single-source, multi-server type of setup (though there are other ways you can deal with that). For static pages, especially if there is something caching in the mix, performance shouldn't be a big concern. It is possible that you'd run into a performance impact with many machines hitting PHP scripts. That is going to depend on your environment though.

To give you an idea how it could be beneficial though: We have a Netapp filer that we dual-present volumes as CIFS to Windows clients (marketing folks) and NFS to the Apache servers, which are load balanced across 4 servers. We have all the Apache servers mounted read-only and marketing is able to make the modifications they need to directly from Dreamweaver or whatever else they use and then save directly to a windows share.

I should mention that this setup is only used for one-off marketing initiatives. Our main site is properly managed with a CMS and goes through a proper workflow.

share|improve this answer
Mmm mmm, developmestuction goodness. – womble Aug 7 '11 at 1:20
Yeah, the bad news is that Marketing has direct access to push content to the website. But they don't listen to anything we say anyway, and we end up doing whatever they it just takes out the argument step :) – Alex Aug 7 '11 at 1:53

There are some situations when using NFS may make sense. One case is if performance of your local disk subsystem is sub-optimal but your NFS storage is on high performance disk array. In all other cases you are just adding your network as failure point with no benefits.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.