D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] 8GB of RAM in 32-bit machine...

 

On 26/06/10 08:43, Gordon Henderson wrote:
On Fri, 25 Jun 2010, Max Siegieda wrote:

On Fri, Jun 25, 2010 at 10:27 AM, Gordon Henderson
<gordon+dcglug@xxxxxxxxxx<gordon%2Bdcglug@xxxxxxxxxx>
wrote:

I may have a requirement to stuff an existing server with more than it's current 4GB of RAM - it's running 32-bit Debian Lenny. The mobo will cope
and it's a new Intel core-2 processor.

Now, I'm not after a single process with more than the current 3GB limit, but I may need to run several programms which individually want a few GB -
hence putting more memory in it - basically to stop it swapping.

(It's a "server" for a specific customer application, so not very general
purpose, but it is running "LAMP", but no X, etc.)

However, I've no experience of more than 4GB of RAM in a 32-bit system, so just wondering if anyones done this - basically what I'm trying to do is avoid a complete re-install on the box (which is 300 miles away) with 64-bit Debian (although compiling a kernel to cope with the added memory is fine)

Any experiences? good/bad/indifferent?

I'm no expert but every report and my own experience has been that you cant have 4GB of RAM in a 32bit machine, physically it'll fit but it wont be in
use and it's a case of luck as to how much beyond 2GB is registered. The
limit is not 3GB per process.

I suspect you're thinking of Windows... AIUI You need the server editions of XP, etc. to be able to see more han 4GB of RAM in a 32-bit machine. Linux sees it fine (or so I'm told)

As for memory in a single process, well, a simple loop of malloc 1K at a time gives me:

  3044 Got 3117336 MB

So about 3GB.

Output from 'top' on that box:

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
25248 root      20   0 3069m 3.0g  348 S    0 87.3   0:01.85 a.out

and if I run a 2nd, it gets the same:

  3045 Got 3118090 MB

(actually it got 1KB more!)

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
25378 root      20   0 3070m 2.9g  296 S    0 85.8   0:04.00 a.out
25248 root      20   0 3069m 152m  260 S    0  4.3   0:01.85 a.out

but note that nearly all the first's been swapped out :)

(the program ends by looping on sleep(100); )

I think there's some architecture issue with 3GB being the max. process size in a 32-bot machine (rather then up to 4GB as you might expect), but I'm not that clued-up on the details.

Gordon

I think the 3GB per process is a 'kernel' thing 1GB reserved for the kernel process' ? IF you have a Physical Address Extension ( a new core2 processor should have that but can your motherboard utilise it?) capable processor you can use more that 4 GB of ram on a 32 bit machine but the most a single process can have is 3GB You can recompile the kernel to use less than the default 1GB and get about 3.7GB per process which might help. I would question what using that much though as filling ram is a good way of locking things up (for a period of time)
Tom te tom te tom

--
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html