dennis labajo (6) [Avatar] Offline
#1
Hello,

In the linux install (appendix), you had specified a 200 gb size of swap. Is this typical if the linux install intended for an openstack setup?

Thank you for coming up with this book. First few chapters have been a nice treat!
cody.bumgardner (57) [Avatar] Offline
#2
Re: 200 GB Swap
Hi Denz97,

In general swap (pagefile) is used for two things: 1) allowing the server to commit more ram to applications than is physically available and 2) memory fragmentation prevention/remediation. In both cases, sections of RAM that are old (not actively used) are written to your disk. When these pages are retrieved, your system has the opportunity to rearrange the data in RAM. While data is on the disk, you system can put more things into RAM.

The old rule of thumb was that your swap should be 2X your RAM. Conventional wisdom has changed on this in years past. Some still stick to the 2X or more and some people run without swap all together.

It really depends on what the server is going to be used for. Here are two links that discuss the use of page/swap with hypervisors.

Blog on Swap:
http://blogs.citrix.com/2011/12/23/the-pagefile-done-right/

IBM KVM Best Practices:
http://pic.dhe.ibm.com/infocenter/lnxinfo/v3r0m0/topic/liaat/liaatbestpractices_pdf.pdf

I made the swap file 200GB since I had 96G of RAM and a large disk. In a production environment not only might the swap be a different size, there would likely be many other partitions and mount points, some even with perhaps differing underlying disk types.

Performance engineering related to Linux is certainly beyond the scope of the book, and perhaps even somewhat of a black art smilie This being said, the OpenStack framework would not require a larger or smaller swap file. However, a compute/hypervisor node, would need a page file fit for a hypervisor, while a controller node would perhaps need one based on a optimal page file size for a DB server.

I hope this helps.

Cody