User: Password:
|
|
Subscribe / Log in / New account

Temporary files: RAM or disk?

Temporary files: RAM or disk?

Posted Jun 4, 2012 16:03 UTC (Mon) by bronson (subscriber, #4806)
In reply to: Temporary files: RAM or disk? by giraffedata
Parent article: Temporary files: RAM or disk?

Web servers, mail servers, file servers, directory servers, dns servers, Jabber servers, bittorrent servers, memcached, database servers, reverse proxy servers, load balancers, etc. etc. Almost all share a work profile that doesn't really benefit from swap.

You'll note that I did say *most*. Of course there exist servers that fall outside this but in my experience they're fairly rare.

So, I'm very curious, what is this somewhat common, swap-friendly type of server that I'm missing?


(Log in to post comments)

Temporary files: RAM or disk?

Posted Jun 4, 2012 21:17 UTC (Mon) by giraffedata (subscriber, #1954) [Link]

Web servers, mail servers, file servers, directory servers, dns servers, Jabber servers, bittorrent servers, memcached, database servers, reverse proxy servers, load balancers, etc. etc. Almost all share a work profile that doesn't really benefit from swap.

...

So, I'm very curious, what is this somewhat common, swap-friendly type of server that I'm missing?

You don't seem to be following the conversation. I said many servers have important data that is neither server software nor backed by a filesystem. I know I don't have to give you examples of those; many of your examples above use plenty of malloc memory. That was to cast doubt on the claim, which I said is way too general to make, that for most servers the important data is server software and other files.

It still might be true, but I'm a long way from being convinced any of us has a wide enough purview of the computer industry to know that the servers with working data are in the minority.

Temporary files: RAM or disk?

Posted Jun 5, 2012 5:59 UTC (Tue) by bronson (subscriber, #4806) [Link]

Obviously what I said was an oversimplification -- it's only 2 sentences. It still provides a decent mental model to answer the OP's question. If you'd like to improve on it, please do. There's plenty of room.

And, I have a reasonable view of the data centers that I've worked in... Most servers I've seen have avoided swapping. Some merely ignore it because it's redundant (Apache, nginx), and some go to unbelievable lengths to avoid it (Oracle). Very few actually embrace it (Varnish). That's just my experience. Again, if you've seen otherwise, please do share.

Temporary files: RAM or disk?

Posted Jun 5, 2012 1:31 UTC (Tue) by vonbrand (guest, #4458) [Link]

I believe you mean they require swap? At least a DNS resolver rapidly accumulates a huge database to keep in RAM, that is relatively rarely used.

Temporary files: RAM or disk?

Posted Jun 5, 2012 6:25 UTC (Tue) by bronson (subscriber, #4806) [Link]

Very true, there have been caching DNS servers that malloc everything and let the VM handle the disk. BIND gained a reputation for absolutely shredding swap space, especially if you were running more than one instance on a box. Now that BIND has its sharable databse plus hooks to use mysql/postgres/ldap/etc, I don't think it works like that anymore...? (I haven't used BIND in quite a while, hallelujah).

Lots of other DNS servers use their own databases and handle caching themselves (tinydns, powerdns, djb). maradns is the one exception I know of, but I don't think it has seen much adoption...?

You make an excellent point, this is a great example of swap usage ont he server. Nevertheless, I'm still under the impression that my "most servers don't want swap" statement still holds.


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds