On Sat, Apr 2, 2011 at 12:06, TAO, NENGBING [AG/1005] <nengbing....@monsanto.com> wrote: > Hi, > > I noticed that after fork, the wait time is excessive (my other > test waited for hours). Is this a known problem, how to get around it? snip > child 3 AFTER sub call :Sat Apr 2 10:45:01 2011 numKeys:4000001 > child 4 BEFORE sub call : Sat Apr 2 10:44:54 2011 > child 4 AFTER sub call :Sat Apr 2 10:45:04 2011 numKeys:5000001 > child 5 BEFORE sub call : Sat Apr 2 10:44:54 2011 > child 5 AFTER sub call :Sat Apr 2 10:45:06 2011 numKeys:6000001 > child 1 BEFORE sub call : Sat Apr 2 10:44:54 2011 > child 1 AFTER sub call :Sat Apr 2 10:45:41 2011 numKeys:20000001 > child 2 BEFORE sub call : Sat Apr 2 10:44:54 2011 > child 2 AFTER sub call :Sat Apr 2 10:45:56 2011 numKeys:30000001 > child 0 BEFORE sub call : Sat Apr 2 10:44:54 2011 > child 0 AFTER sub call :Sat Apr 2 10:48:45 2011 numKeys:100000001 # snip
My bet is you don't have enough RAM to hold all of that data; your OS is being forced to use swap. Your poor machine is so swamped it is taking that long to get back to normal. Each key in your hash is probably taking up around fifteen bytes and each value is probably around four bytes (if not eight). You have 165,000,006 entries. That means you need around 3 gigabytes of RAM for the data alone. That doesn't count the hash that holds the data, perl itself, or any other programs you may be running. -- Chas. Owens wonkden.net The most important skill a programmer can have is the ability to read. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/