Can socket files cause storage system atrophy?

0

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.

Mark Tomlin

Posted 2013-01-07T09:39:32.060

Reputation: 1 179

It might be worth flagging this question for moving to raspberrypi.stackexchange.com. See http://raspberrypi.stackexchange.com/q/325/2955

– RedGrittyBrick – 2013-01-07T09:54:32.033

Answers

2

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.

David Schwartz

Posted 2013-01-07T09:39:32.060

Reputation: 58 310

You probably don't need to, since the backing store will only be touched when a socket is created or destroyed. – David Schwartz – 2013-01-08T22:36:00.020

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 – 2013-01-09T01:16:40.417

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 – 2013-01-09T01:19:23.083