Super User is a question and answer site for computer enthusiasts and power users. 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 was thinking about setting up a web server on a Raspberry Pi, RPi boots from an SD card. The server is meant to be able to be in operation for a very long time, 10 years is it's expected life span. I wanted to know if socket files used by nginx or php-fpm could cause excessive writes to the file system. or are these files held in memory and never touch the drive's file system.

Some SD cards have a problem with read-write-erase cycles, and if the socket file is written to the server's file system on each interaction, could this cause a problem with the lifespan of the SD card?

I plan on setting it up so that access log files are also not written at all, and error log files are emailed and never touch the file system at all.

If socket files do touch the file system, the current work around would be to make a fs in ram that the socket files would be written too.

share|improve this question
It might be worth flagging this question for moving to See – RedGrittyBrick Jan 7 '13 at 9:54
up vote 2 down vote accepted

Socket files touch the file system -- they're files in the file system. But they don't touch the backing store since they don't contain any persistent data.

share|improve this answer
Thank you, I will put the socket files on a ram drive. – Mark Tomlin Jan 8 '13 at 22:23
You probably don't need to, since the backing store will only be touched when a socket is created or destroyed. – David Schwartz Jan 8 '13 at 22:36
Oh, so your saying that it never really touches the file system in so far as each write to the socket is never really written to disk. The socket file kinda works more like a pointer to it's spot in memory. – Mark Tomlin Jan 9 '13 at 1:16
I think you are misusing the term "file system". A "file system" is an abstracion (a piece of software or access method) that provides access to some files that may or may not be stored on some kind of backing store. What you really want to know is whether the backing store is modified. Data in sockets is not stored in a file system's backing store. – David Schwartz Jan 9 '13 at 1:19

You must log in to answer this question.

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