RSS/Atom feed Twitter
Site is read-only, email is disabled

GEGL run -- heavy resources consumption

This discussion is connected to the gegl-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

2 of 2 messages available
Toggle history

Please log in to manage your subscriptions.

GEGL run -- heavy resources consumption Jan Kovanda 19 Oct 21:12
  GEGL run -- heavy resources consumption " 20 Oct 20:32
Jan Kovanda
2010-10-19 21:12:05 UTC (about 14 years ago)

GEGL run -- heavy resources consumption

Hi,
My name is Jan and I have recently discovered this mailing list. I am from the Czech Republic, so please forgive me my not so great English. I am a student working on my bachelor's work -- a program for advanced color corrections. Two testing versions have been already created in the past two years and my objective is to use best techniques and algorithms from those version, add many new features and create new (possibly better) version.

I had to decide between speed and programmer's comfort. I chose C++ as main programming language.

At first, I wanted to create everything from a scratch. My theoretical part includes a tile catching system, a loadable plugins, a color management system and another things. Fortunately I stumbled across GEGL (+ BABL) and found it very useful for my needs. Many of functions I would have created from scratch are already implemented. Now I am trying to bend and stretch GEGL to find out if I will be able to achieve desired functions.

I would like to ask about strange behaviour of GEGL. I am testing a memory usage with those parameters. My computer: 1.5 GB free RAM, 1.4 GB free disk space. A testing program:

GEGL initialization instantiate a graph
creating operations gegl:load, gegl:buffer-sink linking nodes
process(buffer-sink)
[sleep() -- for testing purpose] unref all and exit

A testing picture is 8.5 MB RGB jpeg image 6000px x 6000px.

After the program starts GEGL constantly consumes memory. Somewhere around 1 GB free RAM left it additionally creates two large swap files named xxxx(x)-1 (340 MB) and xxxx(x)-2 (104 MB) in the swap folder. The memory consumption ends at 730 MB free RAM, the swap files are deleted and the program ends. Total (maximal) consumption is 1500MB - 730MB + 340MB + 104MB = 1214MB.

Why GEGL needs so much resources for such simple program? I am not so familiar with inner workings of buffers and caching, but I would expect smaller use of the resources.

Why those swap files are created? In the program I didn't set any properties for swapping to disk.

Why GEGL created the swap files on the disk, even when there was enough free RAM? I would understand the need for swap if there is not enough free RAM.

Thank you in advance for any shed light upon this matter.

Regards, Jan.

"
2010-10-20 20:32:13 UTC (about 14 years ago)

GEGL run -- heavy resources consumption

On Tue, Oct 19, 2010 at 10:12 PM, Jan Kovanda wrote:

A testing picture is 8.5 MB RGB jpeg image 6000px x 6000px.

uncompressed this is 103 MB as 8bit RGB data, 549 MB as 32bit float RGBA data which is what GEGL prefers to work with internally.

Why GEGL needs so much resources for such simple program? I am not so familiar with inner workings of buffers and caching, but I would expect smaller use of the resources.

At least the load and save ops themselves need a buffer the full size of the image to be able to do all the png processing in one go, there is potentially also caches for some of the other operations in a graph.

Why those swap files are created? In the program I didn't set any properties for swapping to disk.

GEGL defaults to swapping to disk, see the various environment variables in http://gegl.org/#_environment for how to tweak this, these settings are also available in the singleton object returned with gegl_config()

You would probably want to increase the tile cache size which defaults to 256mb by setting GEGL_CACHE_SIZE

Disable swapping to disk by setting GEGL_SWAP=RAM in the environment, this will cause GEGL to "swap" unused tiles to RAM instead.

/