DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Installation and Upgrading

OpenBSD Installation and Upgrading Installing and upgrading OpenBSD.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 14th February 2009
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,319
Default

Quote:
Originally Posted by JohnHicks View Post
I have about 1GB of swap and 150MB for /var so is that enough?
There are no black & white answers to these questions, as it depends upon usage.
  • As for how much swap to allocate, one consideration is whether you wish to retain the contents of core memory if the system crashes. If the answer is yes, then one metric used is that swap needs to be somewhere between the amount of RAM present + 1MB to 2x the amount of RAM present (Personally, I would go with 2x to include full system information...). ie. if a system has 1GB of RAM installed, the corresponding amount of swap should be 1GB+ - 2GB. If you aren't concerned about debugging crashes, then the allocated amount of swap can be less.

    Another consideration is whether there is even enough RAM to run the system. There was a time when RAM was quite expensive such that swapping to disk was considered acceptable given the price. Today, RAM is much cheaper comparatively, so for performance reasons people tend to have more than what is needed by the system itself. Average desktop usage may only require 512MB, so 1GB of RAM will probably mean that the system will never swap. And as an extreme, some people will run with no swap because they have sufficient memory available, & they want the disk space for other reasons; plus, they are willing to live with the risk of having no swap available.

    A third consideration is system usage. A heavily-loaded server may require more memory to service lots of requests, just as a huge application may need a lot of memory to implement whatever it may be doing. Any of these factors has a direct bearing on whether a system will swap memory contents to disk.

    The definitive answer for how much swap should be configured comes down to personal choice tempered by watching the output of top(1). top(1) should become your friend.

    So if the system doesn't need to swap, then everything can hum along with no issue. The problem is whether the system ever needs to swap & insufficient swap space is to be found. In this case, the system will crash -- potentially losing valuable application data. Your role is to determine where you want to be in this risk management spectrum -- deciding on how much disk space to allocate to swap based on the amount of RAM present along with system usage.
  • As for how much space to allocate to /var (or any other partition...), this also depends upon usage. The FAQ frames a number of issues in Section 4.5.2:

    http://openbsd.org/faq/faq4.html#Disks

    ...which you should consider, but if you are new to OpenBSD, you should also consider using a single partition for everything until you have a better idea of your usage patterns. At that point, you can refine how many & how large/small any particular partition should be in size.
If this message helps provide (any) perspective, you should be beginning to see that as a newbie, you will probably not stay with your first installation. Basic installation of the operating system is simple enough such that re-installing isn't too difficult, so get some experience first, & then revisit these questions of how much swap & how large should any particular partition be after you know how you will be using this particular system.
Quote:
It feels like this stuff is over my head...
No one learned this stuff overnight, so give yourself some time to get over the learning curve. Unix provides a lot of knobs such that you can get the most out of your hardware. The flip side is that there are few (if any...) safety nets provided. Learning to ask critical questions & learning how to find answers to your own questions is both necessary & rewarding.

Last edited by ocicat; 14th February 2009 at 01:53 AM.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Annoying blue config dialog _hmp_ FreeBSD Ports and Packages 11 28th December 2008 05:37 PM
shutdown message Mr-Biscuit FreeBSD General 1 16th November 2008 11:59 PM
(ttyv0) message. delboy FreeBSD Security 10 29th May 2008 08:25 PM
Message alerts? ocicat Feedback and Suggestions 2 2nd May 2008 03:25 PM


All times are GMT. The time now is 03:12 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick