[DFW.pm] [draft] Hackathon: least memory use category

Tom Metro tmetro+dfw-pm at gmail.com
Fri Jan 3 17:38:18 PST 2014

Being fast isn't everything. What if you're running on a Raspberry Pi,
router, or other memory constrained system? Getting done fast is less
important that just getting done without running out of memory.

Given this, if you think you can excel at creating a memory efficient
design, enter the "least memory use" category.

Memory use will be measured using:

% valgrind --tool=massif --pages-as-heap=yes \
  --massif-out-file=massif.out [your-program]
% cat massif.out | grep mem_heap_B \
  | sed -e 's/mem_heap_B=\(.*\)/\1/' | sort -g | tail -n 1

(That was found to correlate with the numbers reported by 'ps' for a
sample program that allocated a chunk of memory and then slept for a
while, giving ample time to sample the process stats.)

Just to avoid extreme optimizations and having the judges wait around
all day for runs to complete, a maximum run time of 30 minutes will be

The memory use measurement will be taken separately from the speed
measurements, so the performance impact of the memory profiler wont
adversely impact your run times.

Given that this category requires a separate run, you should declare
your desire to compete in this category, and report what you believe
your memory use to be when processing /dedup-more. It should be less
than the reference design uses, which currently is 333 MB.


Tom Metro
The Perl Shop, Newton, MA, USA
"Predictable On-demand Perl Consulting."

More information about the Dfw-pm mailing list