perl2exe RAM garbage collector

R

Robert Henniger

Hi to all.

Today i compiled an perl-script to an EXE with perl2exe under Windows.
This works fine.
This script is an HTTP::Daemon which forks for every request.
This works too.

Now my problem.
With every fork, the ammount of ram increase. With 1000 handled
requests the server needs round about 250MB RAM. The main-process
starts with 45MB.

I think every new process takes 300KB or more RAM. I am reaping my
finished Child-Processes but it doesnt work in perl2exe.

If i run this script with the default perl-interpreter it needs round
about 70MB for 1000 requests.

What can i do to save RAM?


Thanks in advice.

Best regards

Robert
 
S

Sisyphus

Robert Henniger said:
Hi to all.

Today i compiled an perl-script to an EXE with perl2exe under Windows.
This works fine.
This script is an HTTP::Daemon which forks for every request.
This works too.

Now my problem.
With every fork, the ammount of ram increase. With 1000 handled
requests the server needs round about 250MB RAM. The main-process
starts with 45MB.

I think every new process takes 300KB or more RAM. I am reaping my
finished Child-Processes but it doesnt work in perl2exe.

Would probably help if you could produce a *simple* demo of the problem. It
doesn't have to be a demo that does anything useful - just some perl script
that forks and reaps child processes - and that works fine when run as a
perl script, but fails to reap when run as perl2exe-built executable.

If I were to take a punt on a possible fix, I would suggest you try using
Win32::process to launch the child processes (as it possesses a Kill()
function which can be used to terminate processes it has launched).

Cheers,
Rob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,705
Latest member
Stefkari24

Latest Threads

Top