Re: multispectral file access
[email protected] Mon, 1 Sep 2014 17:25:44 +0100
| Newsgroups | gmane.comp.video.graphicsmagick.apis |
|---|---|
| Message-ID | <CAGNS0Rtwv6LdBA0TnDVZWWoz8gHHpccOEDxJEFdUrq=t35tJew@mail.gmail.com> |
On 1 September 2014 16:02, Bob Friesenhahn <[email protected]> wrote: > It would be interesting to see how the GraphicsMagick results change > for this benchmark with this environment variable setting: > > MAGICK_MMAP_READ=TRUE Oh that's interesting. Yes, vips did something similar: too much VM was being chewed up when entire image files were mapped, so it now just maps "windows" of a few hundred scanlines and scrolls them around as operations read pixels. This benchmark just uses libtiff for file read, so vips will be using whatever that is configured to use, read() by default now I think. I tried with and without this, but it didn't make a large difference, on this machine at least: Without the mmap var: $ ./benchmark.sh clearing test area ... building test image ... tmp/x.tif: 5000x5000 uchar, 3 bands, srgb, tiffload program, time (s), peak memory (MB) gm, 0.49, 260.66796875 And with: program, time (s), peak memory (MB) gm, 0.51, 258.2734375 This is Ubuntu 14.04 with a six-core i7. Measuring RSS: I spent ages on this, it's a very hard thing to do well. I tried five or six different things, including parsing strace output. The numbers above are found by running "ps" at 100 Hz and watching the RES line. John ------------------------------------------------------------------------------ Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/