hi! this one works - thnks for all your help! so it's a glibc not perl thing ? why would glibc touch all memory before destruction? (to swap it in once?) > > > > in short: i hab a 600M hash-of-arrays-of-hashes. 500M > > > > pysically. > > > > i fill up the hash: 80 seconds, i calculate > > something: 10 > > > > seconds, > > > > then: exit. the whole procedure takes 15 minutes > > more. > > > > (perl 5.6, no modules used > > > > execpt strict) > > > > > > > > after i filled in some print statements, i now know > > where > > > > it happens: > > > > at the exit. > > > > > > > > with a 'system "kill -9 $$"' as last line the program > > > > just takes 90 seconds. > > > > (as expected) > > > > > > > > is there some garbage collection taking place? it > > seems > > > > unnecessary at the end, > > > > doesn't it? > > Got another idea. This could be as simple as the fact that > you're exiting normally. I'm not entirely sure, but I seem > to remember that glibc itself releases all its memory on > exit(), causing the kernel to have to touch and then > release all the mappings (whereas the kernel simply blows > everything away when a process is killed). One thing you > could try is to add a 'use POSIX ();' at the beginning and > a 'POSIX::_exit(0);' at the end, thereby short-circuiting > glibc's shutdown stuff. Just be sure that all your I/O > buffers are flushed first. MfG, Armin Obersteiner -- armin@xos.net pgp public key on request CUThread Previous | Thread Next