Re: Maximum swap size?
My first question is, why are you partitioning more than 2x your RAM? I highly doubt you have 16GB of RAM. probably because he need it. 2x is just rough estimate, real requirements depends on load ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Maximum swap size?
snott wrote: Trust me, I really do want 250GB (or more) of swap. I'm using swap as a backing store for an HTTP reverse proxy for very large cache sets. Its more efficient to just use the vm layer for LRU object management than to create a huge mmap'd file with file buf caching. I am not certain but I think on 64-bit systems the 32GB limitation is per swap device (on i386 there is a 16GB total limitation because of a 32-bit counter of 512 byte blocks), so you can add multiple swap devices. However if you slice up a disk into many partitions you might lose performance because it will try to round robin between them, assuming they are independent (but they're not; you'll lose I/O throughput from seek delays). It may not be hard to change this behaviour. In general your strategy is a good one but there are other problems; managing that amount of swap will require a lot of auxiliary kernel memory. It is hard to estimate exactly how much for various reasons (it's not entirely deterministic), but in my environment even 20GB of swap requires increasing kern.maxswzone=209715200 i.e. about 200MB of memory just to keep track of the allocated swap. If you don't tune this then you'll run out of "swap zone" when you allocate beyond a certain point, and the kernel will deadlock. I think the default value allows about 8GB of swap use. Other kernel limits will prevent this from being raised above about 1500MB (although a forthcoming change in 8.0 will bring it up to 4GB). Basically, even though there are valid reasons to want to do what you're doing (and I do it myself on the build cluster that builds the FreeBSD packages), you're operating in a zone that would have been considered complete insanity until recently, and sufficiently few people have wanted to try that no-one has thought about optimizing in this regime. I think it would be quite an interesting project to try, though. Kris ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Maximum swap size?
Trust me, I really do want 250GB (or more) of swap. I'm using swap as a backing store for an HTTP reverse proxy for very large cache sets. Its more efficient to just use the vm layer for LRU object management than to create a huge mmap'd file with file buf caching. Skye Ryan Coleman wrote: > > snott wrote: >> Is there a maximum swap size limitation? I'm using a 64-bit arch and >> only >> seem to get about 32GB of usable swap out of a 250GB disk (all of >> /dev/ad6) >> >> Thanks, Skye > > My first question is, why are you partitioning more than 2x your RAM? I > highly doubt you have 16GB of RAM. > -- View this message in context: http://www.nabble.com/Maximum-swap-size--tp18204938p18205925.html Sent from the freebsd-questions mailing list archive at Nabble.com. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Maximum swap size?
snott wrote: Is there a maximum swap size limitation? I'm using a 64-bit arch and only seem to get about 32GB of usable swap out of a 250GB disk (all of /dev/ad6) Thanks, Skye # uname -a FreeBSD XX 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Sun Feb 24 10:35:36 UTC 2008 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/GENERIC amd64 # # bsdlabel ad6s1 # /dev/ad6s1: 8 partitions: #size offsetfstype [fsize bsize bps/cpg] b: 4883920020 swap c: 4883920020unused0 0 # "raw" part, don't edit # # swapctl -hl Device: 1048576-blocks Used: /dev/ad4s1b 4094 0 /dev/ad6s1b32768 0 My first question is, why are you partitioning more than 2x your RAM? I highly doubt you have 16GB of RAM. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Maximum swap size?
Is there a maximum swap size limitation? I'm using a 64-bit arch and only seem to get about 32GB of usable swap out of a 250GB disk (all of /dev/ad6) Thanks, Skye # uname -a FreeBSD XX 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Sun Feb 24 10:35:36 UTC 2008 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/GENERIC amd64 # # bsdlabel ad6s1 # /dev/ad6s1: 8 partitions: #size offsetfstype [fsize bsize bps/cpg] b: 4883920020 swap c: 4883920020unused0 0 # "raw" part, don't edit # # swapctl -hl Device: 1048576-blocks Used: /dev/ad4s1b 4094 0 /dev/ad6s1b32768 0 -- View this message in context: http://www.nabble.com/Maximum-swap-size--tp18204938p18204938.html Sent from the freebsd-questions mailing list archive at Nabble.com. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Swap size
On Fri, Aug 17, 2007 at 11:07:14AM -0400, Andy Greenwood wrote: > My understanding was that you should estimate swap size based on the > sizes of the programs which might be paged out. However, when I first > set up my system, I didn't know this and created 1G swap slices (one on > each disk) but I am not convinced that this was the best thing to do, > since my system almost never uses a noticible percentage of the swap > space. right now, I've got > > [EMAIL PROTECTED] fusefs-sshfs]$ swapinfo > Device 1K-blocks UsedAvail Capacity > /dev/ad0s1b.eli 1048576 1148 1047428 0% > /dev/ad1s1b.eli 1048576 1096 1047480 0% > Total 2097152 2244 2094908 0% > > And the system is under normal load. This system has 1G of RAM. Is there > any sense in having this much swap space when it's not being used? swap is there to guard against overload conditions, not for normal load. If you are paging during normal operations your system performance will be terrible, so you want to make sure you have enough RAM that this does not happen. However, when a transient load spike comes in, would you prefer your system to slow down but keep working, or to kill off all your processes? Think of it as memory space insurance. Kris pgpvcvTfETSpH.pgp Description: PGP signature
Re: Swap size
Andy Greenwood writes: > And the system is under normal load. This system has 1G of > RAM. Is there any sense in having this much swap space when it's > not being used? 1) It is - usually - better to have it and not need it, than need it and not have it. 2) While some machines have a very predictable working set of programs, others vary very widely. Trying to compute the "right" value is an exercise in futility. By default, I use the "2x current or expected memory" rule split over as many physical disks as possible. Robert Huff ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Swap size
--On Friday, August 17, 2007 11:07:14 -0400 Andy Greenwood <[EMAIL PROTECTED]> wrote: Jerry McAllister wrote: On Fri, Aug 17, 2007 at 02:05:57AM +0200, Nicholas Wieland wrote: I was reading tuning(7), and I found that I should size my swap double the size of my physical memory. AFAIK that was true some years ago, when memory was not as cheap as now, and following that guideline I should set my swap to 2GB, which seems far too much for swap (at least to me ...). I will never need this much memory as 1GB RAM and 2GB swap. Is it still correct ? How can I resize with bsdlabel if I already used all my disk space during install ? Remember, disk sizes have shot up too. No, 2 GB is not excessive. You can get by with less, but you're not likely to be using proportionately as much disk now as you used to by going with 2X - I aim for a little over 2X. Remember that swap gets used for crash dumps and also for paging. Now, you may think that you want to keep your machine from paging and in one sense that is true. If you are so memory bound that it has to page just to run, you're going to be so slow that it seems to have froze (by today's standards). But, the system does write stuff to page space and for processes that are often called it can speed things up. So, it is not really a waste to assign that much to swap. jerry TIA, ngw -- Nicholas Wieland [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]" ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]" My understanding was that you should estimate swap size based on the sizes of the programs which might be paged out. However, when I first set up my system, I didn't know this and created 1G swap slices (one on each disk) but I am not convinced that this was the best thing to do, since my system almost never uses a noticible percentage of the swap space. right now, I've got [EMAIL PROTECTED] fusefs-sshfs]$ swapinfo Device 1K-blocks UsedAvail Capacity /dev/ad0s1b.eli 1048576 1148 1047428 0% /dev/ad1s1b.eli 1048576 1096 1047480 0% Total 2097152 2244 2094908 0% And the system is under normal load. This system has 1G of RAM. Is there any sense in having this much swap space when it's not being used? Yes. As was stated earlier, you will need that much space to save a core file if the system crashes. If you don't care about troubleshooting major system crashes, then don't worry about it. OTOH, disk sizes have grown so large that 2GB of swap is negligible use of space. I always configure swap to be 2xRAM plus 200MB. On a 300GB drive, that's less than 1% of the space available. -- Paul Schmehl ([EMAIL PROTECTED]) Senior Information Security Analyst The University of Texas at Dallas http://www.utdallas.edu/ir/security/
Re: Swap size
Jerry McAllister wrote: On Fri, Aug 17, 2007 at 02:05:57AM +0200, Nicholas Wieland wrote: I was reading tuning(7), and I found that I should size my swap double the size of my physical memory. AFAIK that was true some years ago, when memory was not as cheap as now, and following that guideline I should set my swap to 2GB, which seems far too much for swap (at least to me ...). I will never need this much memory as 1GB RAM and 2GB swap. Is it still correct ? How can I resize with bsdlabel if I already used all my disk space during install ? Remember, disk sizes have shot up too. No, 2 GB is not excessive. You can get by with less, but you're not likely to be using proportionately as much disk now as you used to by going with 2X - I aim for a little over 2X. Remember that swap gets used for crash dumps and also for paging. Now, you may think that you want to keep your machine from paging and in one sense that is true. If you are so memory bound that it has to page just to run, you're going to be so slow that it seems to have froze (by today's standards). But, the system does write stuff to page space and for processes that are often called it can speed things up. So, it is not really a waste to assign that much to swap. jerry TIA, ngw -- Nicholas Wieland [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]" ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]" My understanding was that you should estimate swap size based on the sizes of the programs which might be paged out. However, when I first set up my system, I didn't know this and created 1G swap slices (one on each disk) but I am not convinced that this was the best thing to do, since my system almost never uses a noticible percentage of the swap space. right now, I've got [EMAIL PROTECTED] fusefs-sshfs]$ swapinfo Device 1K-blocks UsedAvail Capacity /dev/ad0s1b.eli 1048576 1148 1047428 0% /dev/ad1s1b.eli 1048576 1096 1047480 0% Total 2097152 2244 2094908 0% And the system is under normal load. This system has 1G of RAM. Is there any sense in having this much swap space when it's not being used? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Swap size
On Fri, Aug 17, 2007 at 02:05:57AM +0200, Nicholas Wieland wrote: > I was reading tuning(7), and I found that I should size my swap > double the size of my physical memory. > AFAIK that was true some years ago, when memory was not as cheap as > now, and following that guideline I should set my swap to 2GB, which > seems far too much for swap (at least to me ...). I will never need > this much memory as 1GB RAM and 2GB swap. > Is it still correct ? How can I resize with bsdlabel if I already > used all my disk space during install ? Remember, disk sizes have shot up too. No, 2 GB is not excessive. You can get by with less, but you're not likely to be using proportionately as much disk now as you used to by going with 2X - I aim for a little over 2X. Remember that swap gets used for crash dumps and also for paging. Now, you may think that you want to keep your machine from paging and in one sense that is true. If you are so memory bound that it has to page just to run, you're going to be so slow that it seems to have froze (by today's standards). But, the system does write stuff to page space and for processes that are often called it can speed things up. So, it is not really a waste to assign that much to swap. jerry > > TIA, > ngw > > -- > Nicholas Wieland > [EMAIL PROTECTED] > > > > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "[EMAIL PROTECTED]" ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Swap size
On Aug 16, 2007, at 7:05 PMAug 16, 2007, Nicholas Wieland wrote: I was reading tuning(7), and I found that I should size my swap double the size of my physical memory. AFAIK that was true some years ago, when memory was not as cheap as now, and following that guideline I should set my swap to 2GB, which seems far too much for swap (at least to me ...). I will never need this much memory as 1GB RAM and 2GB swap. Is it still correct ? How can I resize with bsdlabel if I already used all my disk space during install ? TIA, ngw From what I understand, the reasoning behind the math is that, if you have a kernel dump, there's enough room in swap to put the entire core into swap (so it's there when you've rebooted), and that there's enough room left in swap to allow the system to reboot, so you can debug. If you're not worried about your .core files, then I wouldn't worry about the math of 2xmemory. HTH - Eric F Crist Secure Computing Networks ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Swap size
On Fri, Aug 17, 2007 at 02:05:57AM +0200, Nicholas Wieland wrote: > I was reading tuning(7), and I found that I should size my swap > double the size of my physical memory. > AFAIK that was true some years ago, when memory was not as cheap as > now, and following that guideline I should set my swap to 2GB, which > seems far too much for swap (at least to me ...). I will never need > this much memory as 1GB RAM and 2GB swap. > Is it still correct ? 2GB is a reasonable amount of swap space, and unless you plan to turn your system on and leave it in the closet doing nothing, it will use more memory than you think. > How can I resize with bsdlabel if I already > used all my disk space during install ? With a bit of work you can grow partitions (see growfs), but you cannot shrink them. Kris pgpxxpQnKJcpS.pgp Description: PGP signature
Swap size
I was reading tuning(7), and I found that I should size my swap double the size of my physical memory. AFAIK that was true some years ago, when memory was not as cheap as now, and following that guideline I should set my swap to 2GB, which seems far too much for swap (at least to me ...). I will never need this much memory as 1GB RAM and 2GB swap. Is it still correct ? How can I resize with bsdlabel if I already used all my disk space during install ? TIA, ngw -- Nicholas Wieland [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Swap size
[LoN]Kamikaze wrote: Derek Ragona wrote: At 03:03 AM 7/19/2007, Gabriel Linder wrote: Hi, I plan to setup FreeBSD 6.2-RELEASE on my Core Duo laptop with 1GB of RAM. The handbook says "ideal swap size is 2xRAM", so should I use 2GB of swap ? Yes unless you know how many applications will ever be run and their run size. The 2xRAM is so you can always have a reasonable performance allowing swap. You can still run out of swap, and this will cause a panic. With disks so cheap, why not use 2XRAM? Running out of swap doesn't cause a panic, it causes the largest process to be killed. This seems a bit huge to me, I never used more than 400MB on Linux. If so, is there a limit of swap partition size (or number) on i386 (for Linux it's 2GB per partition and 32 partitions max, but I don't know for FreeBSD) ? For a Desktop System 400M should be enough, I don't remember my Desktop system to ever use more than 1m of swap. However, the swap size should be large enough for a dump during a panic. So if you want to be able to do some debugging if you ever run into panics, your swap should be at least as large as your memory. Assuming that you might add more memory one day something between 2 or 4GB of swap look reasonable to me. Thanks for the precisions, I will go for 2xRAM so. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Swap size
Derek Ragona wrote: > At 03:03 AM 7/19/2007, Gabriel Linder wrote: >> Hi, >> >> I plan to setup FreeBSD 6.2-RELEASE on my Core Duo laptop with 1GB of >> RAM. >> >> The handbook says "ideal swap size is 2xRAM", so should I use 2GB of >> swap ? > > Yes unless you know how many applications will ever be run and their run > size. The 2xRAM is so you can always have a reasonable performance > allowing swap. You can still run out of swap, and this will cause a > panic. With disks so cheap, why not use 2XRAM? Running out of swap doesn't cause a panic, it causes the largest process to be killed. >> This seems a bit huge to me, I never used more than 400MB on Linux. >> If so, is there a limit of swap partition size (or number) on i386 >> (for Linux it's 2GB per partition and 32 partitions max, but I don't >> know for FreeBSD) ? For a Desktop System 400M should be enough, I don't remember my Desktop system to ever use more than 1m of swap. However, the swap size should be large enough for a dump during a panic. So if you want to be able to do some debugging if you ever run into panics, your swap should be at least as large as your memory. Assuming that you might add more memory one day something between 2 or 4GB of swap look reasonable to me. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Swap size
At 03:03 AM 7/19/2007, Gabriel Linder wrote: Hi, I plan to setup FreeBSD 6.2-RELEASE on my Core Duo laptop with 1GB of RAM. The handbook says "ideal swap size is 2xRAM", so should I use 2GB of swap ? Yes unless you know how many applications will ever be run and their run size. The 2xRAM is so you can always have a reasonable performance allowing swap. You can still run out of swap, and this will cause a panic. With disks so cheap, why not use 2XRAM? This seems a bit huge to me, I never used more than 400MB on Linux. If so, is there a limit of swap partition size (or number) on i386 (for Linux it's 2GB per partition and 32 partitions max, but I don't know for FreeBSD) ? You can add more swap using a swap file you can check that out doing: man swapon I don't believe there is a limit to swap partitions, other than the limit on other partitions. I have no knowledge on efficiency of a swap partition vs a swap file. -Derek -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks transtec Computers for their support. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Swap size
Hi, I plan to setup FreeBSD 6.2-RELEASE on my Core Duo laptop with 1GB of RAM. The handbook says "ideal swap size is 2xRAM", so should I use 2GB of swap ? This seems a bit huge to me, I never used more than 400MB on Linux. If so, is there a limit of swap partition size (or number) on i386 (for Linux it's 2GB per partition and 32 partitions max, but I don't know for FreeBSD) ? I plan to use two slices so I can have 2x1GB of swap anyway, I'm just curious :-) ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: changing swap size
El Lun 13 Nov 2006 06:34, Zbigniew Szalbot escribió: > If I increase RAM to, say, 1GB, would I need to change the swap size to 2GB? I think not. ¿Are your computer still swaping? > If so, is it a safe process (I assume this can be done using FIPS)? FIPS only works in patitions with FAT16 or FAT32 file system. > Would I need to boot first in single-user mode? no > Any other thoughts? http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/adding-swap-space.html > BTW - is there any easy way to > make sure how much RAM is currently installed other than looking into the > hardware? Top: > > Mem: 146M Active, 23M Inact, 98M Wired, 15M Cache, 41M Buf, 22M Free morena ~> dmesg | grep memory real memory = 519237632 (495 MB) avail memory = 498753536 (475 MB) agp0: detected 16252k stolen memory atapci1: failed to enable memory mapping! ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: changing swap size
On 11/13/06, Zbigniew Szalbot <[EMAIL PROTECTED]> wrote: Hello, Following the advice about periodic freezes, I am going to add some RAM to my system. However, currently my swap size is 512MB. If I increase RAM to, say, 1GB, would I need to change the swap size to 2GB? If so, is it a safe process (I assume this can be done using FIPS)? Would I need to boot first in single-user mode? As has already been said, you don't really need to change your swap size unless you're going to be using all of your physical memory and need the additional space. Since it doesn't sound like you're going to be putting any more load on the server, it's unnecessary. However, if you want to do it, you could, without going to single-user mode: 1) create an empty file somewhere. This will make a 1 MB file, adjust bs and count as you need to. # dd if=/dev/zero of=/path/to/some.file bs=1k count=1024 2) create a file based device with mdconfig like this. # mdconfig -a -t vnode -f /path/to/some.file 3) swapon your shiny new md device. Use the md device that was given as output from the above command. # swapon /dev/md0 4) verify that your device is now working as a swap device with # swapinfo -h 5) now you can swapoff your main swap, change it as you need, and swapon it back # swapoff /dev/ad0s1b # swapon /dev/ad0s1b 6) now that you new, improved swap is working, you can swapoff your temporary swap, remove the md device, delete the file, and verify that your swap is right # swapoff /dev/md0 # mdconfig -d -u md0 # rm /path/to/some.file # swapinfo -h Any other thoughts? BTW - is there any easy way to make sure how much RAM is currently installed other than looking into the hardware? Top: Mem: 146M Active, 23M Inact, 98M Wired, 15M Cache, 41M Buf, 22M Free Which would seem to suggest I have 345 MB RAM. But from what I recall this machine uses 320 MB RAM. Thanks! -- Zbigniew Szalbot ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]" -- I'm nerdy in the extreme and whiter than sour cream ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
RE: changing swap size
If you have swap section 512 Mb that it is not necessary change anything . Simply add operative memory and all. Best regards, Masyukevich Maksim SPIRIT DSP, www.spiritDSP.com/voip, Embedded Voice Experience SeeStorm, www.SeeStorm.com, Synthetic Video Conferencing TeamSpirit - Award-Winning Multi-Point Voice Conferencing Engine -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Zbigniew Szalbot Sent: Monday, November 13, 2006 4:34 PM To: freebsd-questions@freebsd.org Subject: changing swap size Hello, Following the advice about periodic freezes, I am going to add some RAM to my system. However, currently my swap size is 512MB. If I increase RAM to, say, 1GB, would I need to change the swap size to 2GB? If so, is it a safe process (I assume this can be done using FIPS)? Would I need to boot first in single-user mode? Any other thoughts? BTW - is there any easy way to make sure how much RAM is currently installed other than looking into the hardware? Top: Mem: 146M Active, 23M Inact, 98M Wired, 15M Cache, 41M Buf, 22M Free Which would seem to suggest I have 345 MB RAM. But from what I recall this machine uses 320 MB RAM. Thanks! -- Zbigniew Szalbot ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]" ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
changing swap size
Hello, Following the advice about periodic freezes, I am going to add some RAM to my system. However, currently my swap size is 512MB. If I increase RAM to, say, 1GB, would I need to change the swap size to 2GB? If so, is it a safe process (I assume this can be done using FIPS)? Would I need to boot first in single-user mode? Any other thoughts? BTW - is there any easy way to make sure how much RAM is currently installed other than looking into the hardware? Top: Mem: 146M Active, 23M Inact, 98M Wired, 15M Cache, 41M Buf, 22M Free Which would seem to suggest I have 345 MB RAM. But from what I recall this machine uses 320 MB RAM. Thanks! -- Zbigniew Szalbot ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Swap Size Importance?
On Sep 29, 2006, at 9:06 AM, Jerry McAllister wrote: On Fri, Sep 29, 2006 at 08:52:58AM -0700, Chris wrote: Is there any shortfall in performance or reliability to running production with swap equal in size to the 8gb of system memory? I doesn't matter much. But, if you run enough to actually cause paging - which goes to swap space - then it becomes an issue. Also, I am assuming that real paging of active processes is death to that server anyway and means something else has to be throttled back with tuning of network bufs, apache or mysql. Same for crash dumps, can't run a server that is taking dumps or you lose your traffic. I think some things that get pulled to execute often can get left in swap space and accessed more quickly that all the way from main disk each time. eg the system keeps track of what it has in swap and it is more efficient to read from swap - less overhead. But someone This is the part that concerned me. If one views a top on well running system and sees no swapping, I wanted to make certain there is no magic going on behind the scenes where processes have been mapped to swap in such a way that I could be currently benefitting from swap being higher than actual and not know it. If top is an accurate read on whether the system has placed high use processes in swap then it would suggest the first post is correct, and a memory rich system, where you configure to never exceed real memory, wastes that storage taken in swap. For expensive drives, given the sizes we use in RAM now, it's hard to justify. In the case of attempting this raid-5 configuration, it equates to the loss of 24G in scsi storage. I will run with 8g on the system drive. Thank you very much for the responses. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Swap Size Importance?
On Fri, Sep 29, 2006 at 08:52:58AM -0700, Chris wrote: > As a standard practice, I've always configured swap file to be double > the size of real ram split across system and data disk. For example, > 8gb on da0 and 8gb on da1 if the system has 8g real ram. In practice, > In 7 or 8 years, I've never seen swap used for anything but a few k > of inactive processes and I would imagine if real active process > swapping occurred, it would be an immediate indicator that the system > that isn't responsive enough for use anymore and requires upgrade or > tuning. Can't run a website process off disk and keep anyone coming > to the site ;-). (BTW, I'm talking only about high end servers, not > test boxes where I've seen lots of swapping). > > I'm at the point of attempting my first gvinum software raid-5 and > realized, I need the entire disk storage of all three non-system > drives to avoid pulling an 8gb chunk out of the drive sizes. The > configuration is one scsi 72g system disk and 3 that will be used for > the raid volume. I should mention I turn off dumps, haven't found the > use for that in a production server since it should not be rebooting > or it's back in the shop and another box is taking it's place. > > Is there any shortfall in performance or reliability to running > production with swap equal in size to the 8gb of system memory? I > can't think of any but don't want to make a hard to correct mistake > once this thing goes in. It really depends on the number and size of processes you will be running. It you have a large memory and generally run a mix of processes that will totally fit in memory, then it probably doesn't doesn't matter much. But, if you run enough to actually cause paging - which goes to swap space - then it becomes an issue. Also, I think some things that get pulled to execute often can get left in swap space and accessed more quickly that all the way from main disk each time. eg the system keeps track of what it has in swap and it is more efficient to read from swap - less overhead. But someone else should know more about that than I. jerry > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "[EMAIL PROTECTED]" ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Swap Size Importance?
On Friday 29 September 2006 11:52, Chris wrote: > As a standard practice, I've always configured swap file to be double > the size of real ram split across system and data disk. For example, > 8gb on da0 and 8gb on da1 if the system has 8g real ram. In practice, > In 7 or 8 years, I've never seen swap used for anything but a few k > of inactive processes and I would imagine if real active process > swapping occurred, it would be an immediate indicator that the system > that isn't responsive enough for use anymore and requires upgrade or > tuning. Can't run a website process off disk and keep anyone coming > to the site ;-). (BTW, I'm talking only about high end servers, not > test boxes where I've seen lots of swapping). > > I'm at the point of attempting my first gvinum software raid-5 and > realized, I need the entire disk storage of all three non-system > drives to avoid pulling an 8gb chunk out of the drive sizes. The > configuration is one scsi 72g system disk and 3 that will be used for > the raid volume. I should mention I turn off dumps, haven't found the > use for that in a production server since it should not be rebooting > or it's back in the shop and another box is taking it's place. > > Is there any shortfall in performance or reliability to running > production with swap equal in size to the 8gb of system memory? I > can't think of any but don't want to make a hard to correct mistake > once this thing goes in. Nope. I routinely run boxes with 512MB or 1GB of swap, even if the RAM size is much higher than that. You won't have anywhere to save a crashdump in that case, but you seem to already be aware of that. JN ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Swap Size Importance?
As a standard practice, I've always configured swap file to be double the size of real ram split across system and data disk. For example, 8gb on da0 and 8gb on da1 if the system has 8g real ram. In practice, In 7 or 8 years, I've never seen swap used for anything but a few k of inactive processes and I would imagine if real active process swapping occurred, it would be an immediate indicator that the system that isn't responsive enough for use anymore and requires upgrade or tuning. Can't run a website process off disk and keep anyone coming to the site ;-). (BTW, I'm talking only about high end servers, not test boxes where I've seen lots of swapping). I'm at the point of attempting my first gvinum software raid-5 and realized, I need the entire disk storage of all three non-system drives to avoid pulling an 8gb chunk out of the drive sizes. The configuration is one scsi 72g system disk and 3 that will be used for the raid volume. I should mention I turn off dumps, haven't found the use for that in a production server since it should not be rebooting or it's back in the shop and another box is taking it's place. Is there any shortfall in performance or reliability to running production with swap equal in size to the 8gb of system memory? I can't think of any but don't want to make a hard to correct mistake once this thing goes in. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Swap size
> > Hello all, > > What swap size should i use having 768 Mb of memory? > I've heard something about preformance degradation if > swap size is bellow 2x of ram... Traditionally, 2 1/2 X RAM size. But everyone seems to have their own prejudice on this. It depends on the size and number of processes you will run compared to the amount of RAM you have - paging goes to swap space - as well as if you need to take a crash dump - crash dumps need some more than RAM to do completely, etc. jerry > > Thanks, > Alexander. > ___ > [EMAIL PROTECTED] mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "[EMAIL PROTECTED]" > ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Swap size
Lists <[EMAIL PROTECTED]> wrote: > Hello all, > > What swap size should i use having 768 Mb of memory? > I've heard something about preformance degradation if > swap size is bellow 2x of ram... Other's have pointed out that you don't _need_ swap space. If you have enough RAM, you can operate without it. However, if you need to do kernel core dumps (in the even you run into kernel panic problems) you will need at least as much swap space as you have RAM, plus a little. Additionally, if your machine ever does start to swap, FreeBSD's VM code _is_ optimized on the assumption that you have 2x your RAM in swap. If the machine starts to swap, you will get the best performance under all loads (including _heavy_ swapping) if you have 2x RAM in swap. However, FreeBSD still performs nicely with less swap than that. -- Bill Moran Potential Technologies http://www.potentialtech.com ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Swap size
Lists <[EMAIL PROTECTED]> writes: > What swap size should i use having 768 Mb of memory? > I've heard something about preformance degradation if > swap size is bellow 2x of ram... You don't *need* ANY swap. Until you fill up your RAM, at which point it's nice to have some swap space instead of having the kernel start killing processes. In order to do a crash dump, you need an overwritable partition that's at least slightly larger than your RAM. The swap partition is often given this job as well as serving as swap space. If you have some idea of your worst-case virtual memory usage, allocate that much swap (less about the amount of RAM you have). If you don't know, either set aside a huge amount of space or experiment and see how much you need (and then allocate half again as much to be safe). ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Swap size
I think for most cases if you have more then 512 MB of ram you can just have the swap size the same size as the amount of ram you have installed. Lists wrote: Hello all, What swap size should i use having 768 Mb of memory? I've heard something about preformance degradation if swap size is bellow 2x of ram... Thanks, Alexander. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]" ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Swap size
Hello all, What swap size should i use having 768 Mb of memory? I've heard something about preformance degradation if swap size is bellow 2x of ram... Thanks, Alexander. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: swap size and zombie
In the last episode (Jun 12), Chris said: > Looking at a web/email server with the following from "top" ... > > last pid: 29494; load averages: 0.00, 0.00, 0.00 up 85+12:33:05 23:07:44 > 39 processes: 1 running, 37 sleeping, 1 zombie > CPU states: 0.0% user, 0.0% nice, 0.0% system, 0.0% interrupt, 100% idle > Mem: 197M Active, 545M Inact, 176M Wired, 51M Cache, 112M Buf, 33M Free > Swap: 2048M Total, 184K Used, 2048M Free > > Does it look like the swap file is way too big? The box has been > online for awhile, yet it seems like the swap file is not utilized > very much at all. For that matter, the server is clearly overpowered > for what it does, but better than underpowered I suppose. Sysinstall defaults to creating a swap partition that is 2x RAM, but for large-memory systems it's usually overkill (do you really plan on running 3gb worth of processes in a 1gb system?). 1x RAM is the minimum if you want to be able to save kernel crashdumps though, so it may be useful if you ever double the RAM in the box. > Also, I cannot seem to get rid of that zombie... it happens at boot time: > > root 0 0.0 0.0 00 ?? ZW - 0:00.00 (perl) Run ps axl, find the parent process (PPID column), and fix the bug in it :) -- Dan Nelson [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
swap size and zombie
*This message was transferred with a trial version of CommuniGate(tm) Pro* Looking at a web/email server with the following from "top" ... last pid: 29494; load averages: 0.00, 0.00, 0.00 up 85+12:33:05 23:07:44 39 processes: 1 running, 37 sleeping, 1 zombie CPU states: 0.0% user, 0.0% nice, 0.0% system, 0.0% interrupt, 100% idle Mem: 197M Active, 545M Inact, 176M Wired, 51M Cache, 112M Buf, 33M Free Swap: 2048M Total, 184K Used, 2048M Free Does it look like the swap file is way too big? The box has been online for awhile, yet it seems like the swap file is not utilized very much at all. For that matter, the server is clearly overpowered for what it does, but better than underpowered I suppose. Also, I cannot seem to get rid of that zombie... it happens at boot time: root 0 0.0 0.0 00 ?? ZW - 0:00.00 (perl) Thanks, Chris _ Email harvesters eat this: [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: swap size and a zombie
On Fri, Jun 11, 2004 at 11:10:50PM -0500, Chris wrote: > *This message was transferred with a trial version of CommuniGate(tm) Pro* > > > Looking at a web/email server with the following from "top" ... > > > last pid: 29494; load averages: 0.00, 0.00, 0.00 up 85+12:33:05 23:07:44 > 39 processes: 1 running, 37 sleeping, 1 zombie > CPU states: 0.0% user, 0.0% nice, 0.0% system, 0.0% interrupt, 100% idle > Mem: 197M Active, 545M Inact, 176M Wired, 51M Cache, 112M Buf, 33M Free > Swap: 2048M Total, 184K Used, 2048M Free > > > Does it look like the swap file is way too big? The box has been > online for awhile, yet it seems like the swap file is not utilized > very much at all. For that matter, the server is clearly overpowered > for what it does, but better than underpowered I suppose. It's only too much until you actually need to use it ;-) For example, if you have 2GB of memory then you need a 2GB swap file in order to take a kernel crash dump, if you ever run into a kernel bug. You only have ~1GB of RAM in that machine at the moment, so you might be tempted to conclude that you have 1GB too much swap, but what if you decide to add another 1GB of RAM in 6 months time? You'd have to reinstall that disk to make room. Kris P.S. Please wrap your lines at 70 characters so your emails may be easily read. pgptIkwYb4ixO.pgp Description: PGP signature
swap size and a zombie
*This message was transferred with a trial version of CommuniGate(tm) Pro* Looking at a web/email server with the following from "top" ... last pid: 29494; load averages: 0.00, 0.00, 0.00 up 85+12:33:05 23:07:44 39 processes: 1 running, 37 sleeping, 1 zombie CPU states: 0.0% user, 0.0% nice, 0.0% system, 0.0% interrupt, 100% idle Mem: 197M Active, 545M Inact, 176M Wired, 51M Cache, 112M Buf, 33M Free Swap: 2048M Total, 184K Used, 2048M Free Does it look like the swap file is way too big? The box has been online for awhile, yet it seems like the swap file is not utilized very much at all. For that matter, the server is clearly overpowered for what it does, but better than underpowered I suppose. Also, I cannot seem to get rid of that zombie... it happens at boot time: root 0 0.0 0.0 00 ?? ZW - 0:00.00 (perl) Thanks, Chris _ Email harvesters eat this: [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Maximum Swap Size
Scott Ballantyne wrote: Hmmm... I didn't know there was a maximum swap size on FreeBSD 4.10 of 1677216 blocks... Is there an easy way to reduce this partition without redoing the entire install? Yes. Delete just the swap partition in place, then recreate it using a smaller size (using /stand/sysinstall or another tool of your choice). The rest of your existing partitions and the data in them should be fine... -- -Chuck ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Maximum Swap Size
Hmmm... I didn't know there was a maximum swap size on FreeBSD 4.10 of 1677216 blocks... Is there an easy way to reduce this partition without redoing the entire install? sdb ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"