Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

64-bit architecture a memory hog for Apache/mod_perl?

by Booger (Pilgrim)
on Jan 12, 2006 at 14:43 UTC ( #522703=perlquestion: print w/ replies, xml ) Need Help??
Booger has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks:

I am working with a couple of Apache/mod_perl applications that run on 32-bit and 64-bit platforms. The versions that run on these to platforms are identical as far as the code base goes. Both are platforms are Red Hat Enterprise (same version -- different architecture).

My question stems from my lack of understanding of 64-bit architectures in general.

I am having some difficulty understanding why the Apache processes on the 64-bit machine are some 60% larger resident memory-wise. This huge difference in memory use is causing some rather bad performance on the 64-bit platform.

Is anyone aware of anything in general that I should be aware of when moving Apache/mod_perl applications to 64-bit platforms?

Thanks in advance,

Matt

Comment on 64-bit architecture a memory hog for Apache/mod_perl?
Re: 64-bit architecture a memory hog for Apache/mod_perl?
by Elian (Parson) on Jan 12, 2006 at 14:57 UTC
    This isn't much of a surprise. In general, moving an application from a 32 to a 64 bit architecture machine will mean more memory usage, and 60% sounds about right.

    While the memory used by strings and floating point data generally won't change in size, integers and pointers are now twice as big as they used to be, and perl makes use of a lot of integers and pointers internally. Going to a 64 bit architecture also means that the way some data structures are packed together changes and makes them a bit bigger on top of the extra memory needed for the larger pointers and integers.

    This is true of any language, not just perl. Do a 64-bit build of python or ruby, or recompile your C program to be fully 64-bit, and you'll see the same sort of memory usage increase.

    Basically assume a move to a 64 bit platform means you need twice as much memory on the system for equivalent performance. That's a bit of an over-estimate, but it should see you through OK, and memory's reasonably cheap.

Re: 64-bit architecture a memory hog for Apache/mod_perl?
by grinder (Bishop) on Jan 12, 2006 at 15:55 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://522703]
Approved by Corion
Front-paged by zby
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2014-09-21 21:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (176 votes), past polls