From owner-freebsd-questions@FreeBSD.ORG Wed May 29 20:13:42 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id AB718342 for ; Wed, 29 May 2013 20:13:42 +0000 (UTC) (envelope-from paul@kraus-haus.org) Received: from mail-vb0-x230.google.com (mail-vb0-x230.google.com [IPv6:2607:f8b0:400c:c02::230]) by mx1.freebsd.org (Postfix) with ESMTP id 68364695 for ; Wed, 29 May 2013 20:13:42 +0000 (UTC) Received: by mail-vb0-f48.google.com with SMTP id w8so5555904vbf.7 for ; Wed, 29 May 2013 13:13:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer :x-gm-message-state; bh=OzDOiuvQ64s/xwEukbUBPaJTOLLI21zA0++t8lDebgQ=; b=gsM1fgW27ndR+VXFgqPPFzbhzZZ/A1KpvCgnL06KNzv4Y++3X5EzapvOAHLmRY43a1 qobpH7C4VnTccIzUBH3EylXO5AmKBvwCUVJAdVQ5KUS/kTi1mXds+RJ+KCzObYtPK032 Pvy7wfYlWhZ3SbbFjmNTDfODExaqA2oGm3owGgBjt9h0jnP+L4qpi6JA/zg9ZSdkNtqo 5OvxL+W5A8cNrRoetRotQBcJ/Bqs7dyH/lAc7RxlCKvkFth81ssCSVbYJXBNRduWv7DE 25xsufpuMlHhY0HBd3wvOFOHrRt3Cc+KliiLRoA2RWzL37zPju1MX6deGUHluxoCUSw+ ZzRA== X-Received: by 10.52.114.135 with SMTP id jg7mr2286851vdb.78.1369858421855; Wed, 29 May 2013 13:13:41 -0700 (PDT) Received: from mbp1.kraus-haus.org (mail.thecreativeadvantage.com. [96.236.16.109]) by mx.google.com with ESMTPSA id ho10sm29709665vdb.7.2013.05.29.13.13.40 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 29 May 2013 13:13:40 -0700 (PDT) Subject: Re: "swap" partition leads to instability? Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) Content-Type: text/plain; charset=us-ascii From: Paul Kraus In-Reply-To: Date: Wed, 29 May 2013 16:13:39 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: <7695CBFB-60A6-4E64-BB8B-FD0413271A9D@kraus-haus.org> References: <1369558712.96152.YahooMailNeo@web165006.mail.bf1.yahoo.com> <20130529133516.295084a6@gumby.homeunix.com> To: jb X-Mailer: Apple Mail (2.1503) X-Gm-Message-State: ALoCoQl/fy+1DQu2s4Kns35GInWJ4fVgVBTdWwW5iZuLMXqVRp5/2lYTH6c8W3ZDZNWCnH54E5KO Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 May 2013 20:13:42 -0000 On May 29, 2013, at 3:52 PM, jb wrote: > Yes, there is some confusion about the diff, if any, between paging = and=20 > swapping. >=20 > Paging - copying or moving pages between physical memory (RAM) and = secondary > storage (e.g. hard disk), in both directions. > Swapping - nowdays is synonymous with "paging". > You say that FB supports both, Linux supports paging only. > Well, Linux utilizes swap space as part of virtual memory. > So, can you elaborate more on that - what is the essence of the diff, = why > should I avoid the term "swapping" when referring to Linux, assuming = VMM > systems on both ? When I started working professionally with Unix systems in 1995, = I was taught that paging was the process of copying least used "pages" = of RAM onto disk so that the RAM could be freed if the system needed = more RAM. Swapping was the process of moving an entire program from RAM = to disk in order to free up RAM. In other words, a process can be "swapped out" and placed on = disk until it comes up to run again, at which point it can be "swapped = in" and executed. I think that much of the confusion comes from the use of the = SWAP device by the PAGING system. When the concept of paging came about, = it just used the already existing SWAP space to store it's "paged out" = pages of memory. On the systems I worked on at the time (SunOS / Solaris), paging = was a sign of pressure on the physical memory (RAM) of a system, = swapping was a sign of _severe_ physical memory pressure. This was a = time when we configured 2 to 4 times the amount of physical RAM as SWAP = space. RAM was very expensive and hard drives just expensive :-) It was = common on a "normally" operating system to see the page scanner* running = up to 100 times per second. A scan rate of over 100 was considered a = sign of pressure on RAM that needed to be addressed, any SWAPing was = considered a sign that the system needed more physical RAM. Today RAM is so cheap that _any_ paging is often considered bad = and an indication that more Ram should be added. *Solaris Page Scanner: This is a kernel level process that wakes up, = examines the amount of free RAM, and takes action based on that value. = The thresholds are all dynamic and based on the amount of RAM in the = system. Above a high water mark the scanner does nothing. As the amount = of free RAM drops, various pages of RAM are copied to SWAP space and the = RAM freed. Eventually, if the amount of free Ram falls low enough, even = parts of the kernel will be paged out. This is very bad and can lead to = a system "thrashing" where it spends the vast majority of it's time just = paging in and out and not actually getting anything done. -- Paul Kraus Deputy Technical Director, LoneStarCon 3 Sound Coordinator, Schenectady Light Opera Company