Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re: Forking server for ssh tunnels

by zentara (Archbishop)
on Feb 26, 2006 at 19:34 UTC ( #532911=note: print w/replies, xml ) Need Help??

in reply to Forking server for ssh tunnels

I was just building perl5.8.8 today and realized someone should have mentioned that you can make a "shared so" perl, which would significantly reduce the memory usage. My (typical) static perl is a little over 1 meg. If you build a "shared perl so lib", your Perl instances will probably be under 100k each, and all share 1 lib.

When you build Perl, you are asked if you want to do this. Although salva's advice of examining how you are opening ssh is probably important.

I'm not really a human, but I play one on earth. flash japh

Replies are listed 'Best First'.
Re^2: Forking server for ssh tunnels
by tinypig (Beadle) on Feb 26, 2006 at 20:57 UTC
    Ah, that is fantastic! I had forgotten that was one of the things I was meaning to look into. Based on what I'm seeing, I do not think we have it configured that way. Thanks for the suggestion. ++
Re^2: Forking server for ssh tunnels
by salva (Canon) on Feb 26, 2006 at 22:36 UTC
    Well, not really, modern operating systems do not clone the full memory image when forking but use a copy-on-write machanism, so they would share the perl binary code and most of the heap data anyway.

    I think, that even if you run the same process several times, the OS will not use new memory for the additional copies becauses it mmaps the executable.

    Compiling perl as a dynamic library is only useful if you are compiling it to build different executables, for instance, perl and Apache+mod_perl.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://532911]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (5)
As of 2023-05-30 18:40 GMT
Find Nodes?
    Voting Booth?

    No recent polls found