From: Thomas Sondergaard Date: 2004-03-25T02:54:31+09:00 Subject: Re: Tempfile consuming a lot of memory > Have you tried the same under Linux ? > Maybe this can give us a clue what is wrong. I have now: 18:47:02 up 33 days, 23:19, 2 users, load average: 1.38, 0.97, 0.43 58 processes: 57 sleeping, 1 running, 0 zombie, 0 stopped CPU states: 11.3% user 4.7% system 0.0% nice 0.0% iowait 83.8% idle Mem: 223140k av, 220044k used, 3096k free, 0k shrd, 752k buff 141028k actv, 29580k in_d, 3632k in_c Swap: 457844k av, 231440k used, 226404k free 4788k cached PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU COMMAND 26968 ts 15 0 272M 160M 500 D 11.1 73.6 1:16 0 ruby 26966 ts 15 0 4116 1052 500 S 0.0 0.4 0:03 0 emacs 27036 ts 15 0 976 840 684 R 0.5 0.3 0:00 0 top I grew tired of waiting on it (my linux box only has 256 megs of memory) when it had about 780 temporary files at which point the process was using 272MB of memory. So it is pretty much the same on linux - not surprisingly. I have made a few other experiments, including implementing my own TempFile2 class. If I use the same strategy as Tempfile and use a SimpleDelegator to delegate to an instance of File I get the same memory consumption. I haven't figured out why it is so.. Cheers, Thomas