Hi there, I need more information to debug this. Please either confirm the bug and provide more information, or mark this bug as "not a bug".
grepmail uses Mail::Mbox::MessageParser, which is designed to use memory proportional to the largest email message in a mailbox. I verified that it does indeed operate this way, using a 54MB mailbox: mbox size: 56683943 max email size: 11182857 max read buffer: 11184795 <-- Biggest size of M::M::MP's read buffer folder_reader: 11186558 <-- Biggest size of the M::M::MP Perl object Some stats from ps(1): Plain text mailbox: min real memory: 4976640 min virtual memory: 618000384 max real memory: 38674432 max virtual memory: 651546624 Gzip compressed: min real memory: 5005312 min virtual memory: 618016768 max real memory: 38694912 max virtual memory: 651563008 I also tried a 540MB mailbox, created by concatenating the mailbox 10 times: Plain text x10: min real memory: 4976640 min virtual memory: 618000384 max real memory: 40292352 max virtual memory: 652021760 Gzip compressed x10: min real memory: 5005312 min virtual memory: 618016768 max real memory: 40284160 max virtual memory: 652038144 The numbers above were basically the same for a 23KB mailbox. Also note that this command: perl -e 'system "ps -o rss,vsz $$"' consumes 1175552 real and 615645184 virtual memory, so the numbers above are not out of the ordinary. If you could run the attached anonymize_mailbox script on your mailbox, verify that memory usage is still bad, then send the mailbox to me, I can debug this better. Another idea: perhaps your mailbox is malformed, such that grepmail only sees 1 email in the whole mailbox. You can check this by running: grepmail -r . my_big_mailbox If you want to confirm that you have a very large email in your mailbox, find this line in grepmail: my $email = $folder_reader->read_next_email(); and follow it with this line: print length($$email) . "\n"; then run something like: grepmail nonexistent_pattern my_big_mailbox | sort -n Regards, David _____________________________________________________________________ David Coppit http://coppit.org/ -- To UNSUBSCRIBE, email to debian-qa-packages-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org