LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   Swap pointless on a 32bit system with >4GiB hardware ram? (http://www.linuxquestions.org/questions/linux-general-1/swap-pointless-on-a-32bit-system-with-4gib-hardware-ram-815382/)

onedingo 06-21-2010 04:17 AM

Swap pointless on a 32bit system with >4GiB hardware ram?
 
Hey.

I might need to switch to i686 ArchLinux as flashplugin has been removed from the 64 bit version. Also, i could then install virtualbox-ose.

Since 32bit os has 4G limitation, is a swap partition even needed/used on a system with more than 4G hardware ram?

johnsfine 06-21-2010 05:35 AM

Quote:

Originally Posted by onedingo (Post 4009940)
Since 32bit os has 4G limitation, is a swap partition even needed/used on a system with more than 4G hardware ram?

The 4GB limit is address space per process. After address space used by the kernel, you have a limit of 3GB of virtual memory per process.

But cache and buffer memory is outside the process address space and other processes have their own address spaces. So a 32 bit Linux may be using much more than 4GB of memory.

Having some swap space is generally a good idea. The amount of anonymous memory in idle processes determines the amount of swap space that will benefit your system. That is a characteristic of the set of programs you run, not of the amount of physical ram you have. So no computation of swap size based just on ram size is valid.

Also, if you have 4GB or more of physical ram, a 32 bit kernel needs PAE support to be able to use that ram. But you might use far more than 4GB of "memory" including swap even if your physical ram is less.

shreshtha 06-21-2010 06:46 AM

In your statement - "After address space used by the kernel, you have a limit of 3GB of virtual memory per process."
Is this one more appropriate - "After address space used by the kernel, you have a limit of 3GB of virtual memory per user mode process."

fruttenboel 06-21-2010 06:58 AM

Quote:

Originally Posted by onedingo (Post 4009940)
Hey.

I might need to switch to i686 ArchLinux as flashplugin has been removed from the 64 bit version. Also, i could then install virtualbox-ose.

Since 32bit os has 4G limitation, is a swap partition even needed/used on a system with more than 4G hardware ram?

To my opinion: yes.

But, to be on the safe side (especially when running a candycane Linux) it cannot harm to use a 4 GB swap partition or a swapfile. Advantage of the swapfile is that you can easily change the size and do some performance experiments with the file size.

http://www.cyberciti.biz/faq/linux-a...ap-file-howto/

onedingo 06-21-2010 07:38 AM

Thanks all.

I will leave the swap partition in.

kumar.manoj412 06-21-2010 08:50 AM

4GB is hardware limit not the software limit. You must have swap as kernel use it for virtual address space. this virtual address space starts with some offset.



Quote:

Originally Posted by onedingo (Post 4009940)
Hey.

I might need to switch to i686 ArchLinux as flashplugin has been removed from the 64 bit version. Also, i could then install virtualbox-ose.

Since 32bit os has 4G limitation, is a swap partition even needed/used on a system with more than 4G hardware ram?


fruttenboel 06-21-2010 01:33 PM

Quote:

Originally Posted by kumar.manoj412 (Post 4010214)
4GB is hardware limit not the software limit. You must have swap as kernel use it for virtual address space. this virtual address space starts with some offset.

Wrong.

You can run without Swapspace: I did it for years, but the system gets sluggish when you reach the limits of RAM. On a 128 MB machine, that is pretty soon. On a 4 GB system that might never be.

In the past I used to run with "swap = half of RAM" and that worked very well. With a 4 GB RAM system, 1 GB swap will be more than enough. In the rare case that a memory leak eats up the full 4 GB of RAM, you may get into trouble. But then again: with a swap space added, you will get in the same trouble, but only later.

zeno0771 06-22-2010 02:36 AM

I saw this question from the other angle: Why go back to a 32-bit install when you can merely add the 32-bit libs to your existing 64-bit install?

You should also be able to get the 64-bit plugin right from Adobe and put it in mozilla/plugins unless something blew up over there that I haven't heard about yet.

onedingo 06-22-2010 09:50 AM

Quote:

Originally Posted by zeno0771 (Post 4011061)
I saw this question from the other angle: Why go back to a 32-bit install when you can merely add the 32-bit libs to your existing 64-bit install?

I'm not sure they provide a lib32 package or not. Will have to look into.

Quote:

Originally Posted by zeno0771 (Post 4011061)
You should also be able to get the 64-bit plugin right from Adobe and put it in mozilla/plugins unless something blew up over there that I haven't heard about yet.

http://www.archlinux.org/news/501/ has more info

zeno0771 06-22-2010 10:26 AM

Quote:

Originally Posted by onedingo (Post 4011455)
I'm not sure they provide a lib32 package or not. Will have to look into.

IIRC we used to just run a 32-bit version before a 64-bit version even existed, though I suppose it depends on why you need it (i.e. besides just Firefox).

Have you considered just running what you need in a chroot jail? This is just the thing for when you have to have a 32-bit version of something but can't/don't want to go back to 32-bit:

http://wiki.archlinux.org/index.php/Arch64_FAQ

http://windowsanonymous.org/index.ph...logs&Itemid=44

Quote:

Originally Posted by onedingo (Post 4011455)

Leave it to Adobe.

onedingo 06-27-2010 06:34 AM

@zeno0771

I think it may be simpler to just go with i686.

64 bit hardware running 64 bit os with 32 bit libs added to run virtualbox hosting 32 bit os.

yuck

Thanks for the ideas though.

zeno0771 06-29-2010 11:38 PM

Quote:

Originally Posted by onedingo (Post 4016247)
@zeno0771

64 bit hardware running 64 bit os with 32 bit libs added to run virtualbox hosting 32 bit os.

Waitaminute...
Are you holding on to VBox-OSE because you want totally open-source, free-as-in-speech-style? If not, the Personal Use version is only limited in terms of redistribution; you're not limited really any other way:
Quote:

§ 2 Grant of license. (1) Oracle grants you a personal, non-exclusive, non-transferable, limited license without fees to reproduce, install, execute, and use internally the Product a Host Computer for your Personal Use, Educational Use, or Evaluation. “Personal Use” requires that you use the Product on the same Host Computer where you installed it yourself and that no more than one client connect to that Host Computer at a time for the purpose of displaying Guest Computers remotely. “Educational use” is any use in an academic institution (schools, colleges and universities, by teachers and students). “Evaluation” means testing the Product for a reasonable period (that is, normally for a few weeks); after expiry of that term, you are no longer permitted to evaluate the Product.

(2) The “VirtualBox Guest Additions” are a set of drivers and utilities that are shipped as a subset of the Product for the purpose of being installed inside a Guest Computer to improve its performance and cooperation with the rest of the Product. In addition to and independent of the rights granted by subsection 1, Oracle allows you to install, execute, copy and redistribute a) unmodified copies of the ISO installation medium of the VirtualBox Guest Additions as shipped with the Product and b) the VirtualBox Guest Additions together with the Guest Computer into which they have been installed.
I use VBox-PUEL 64-bit with no problems in my Arch64 install and can run both 32 and 64-bit guest OSes; in fact the only reason I have 32-bit binaries is for WINE and their stay on my machine may be limited.

If I'm missing something please let me know; I'd hate to see you go to all the effort because of a misunderstanding.


All times are GMT -5. The time now is 08:54 PM.