Author Topic: Out of memory problems / Problemas de memoria insuficiente  (Read 43022 times)

Offline xatamec

  • Member
  • *
  • Posts: 52
Re: Out of memory problems / Problemas de memoria insuficiente
« Reply #15 on: 2009 December 02 01:13:54 »
Hi Carlos,

I appreciate your comments but I disagree in the solution you are proposing.

On one hand, as far as I know, a 32-bit OS can only address 2Gb of memory, so it would be useless to install that huge amount of RAM.
On the other hand, if this proplem happens when the script is run just with 2 DSLR images resampled to 32 bit depth, no other images open in PixInsight and no other applications running on the computer, it's likely to be due to a memory management inefficiency, not to lack of memory resources.

Cheers,
Sergi
« Last Edit: 2009 December 02 06:26:38 by xatamec »

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Out of memory problems / Problemas de memoria insuficiente
« Reply #16 on: 2009 December 02 03:53:21 »
Hola Sergi

Quote
Pues yo tengo el problema de memoria cuando utilizo el script HDR Composition, tanto en Windows XP como en Vista de 32bits, con un ordenador dual core con 2Gb de RAM y PixInsight 1.5.9, a pesar de haber actualizado los SO con los últimos SP disponibles y de haber instalado el paquete redistribuible de Visual C++ que recomienda Juan.

El problema aquí es el script HDRComposition. No es que no funcione, que lo hace excepcionalmente bien, sino que tiene unos requerimientos de memoria ciertamente muy exagerados. Las razones tienen que ver con el hecho de que, de por sí, las transformaciones de wavelets que se utilizan requieren mucha memoria (cada capa es un duplicado de la imagen en 32 bits), y además, sobre todo, que el motor de JavaScript es problemático con el uso de la memoria. Es muy probable que se pueda optimizar el script para reducir el consumo de memoria, pero de momento no lo hemos hecho por falta de tiempo. Trataré de echarle un vistazo lo antes posible.

La solución, como ha apuntado David, es implementar este algoritmo en C++ como un módulo independiente. Esto es urgente, dada la importancia de esta tarea, pero en este momento no me es posible acometerla por falta de tiempo. Básicamente en este momento todo el tiempo lo estoy dedicando a realizar nuevos videotutoriales, lo cual es la máxima prioridad ahora.

Así que paciencia, esto se solucionará y tendremos el mejor sistema de composición HDR con un consumo de memoria razonable, pero las prioridades son las prioridades, y yo sólo soy uno, y mis días son de entre 12 y 20 horas laborables. Esto es lo que hay :)
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Out of memory problems / Problemas de memoria insuficiente
« Reply #17 on: 2009 December 02 04:21:22 »
Quote
On one hand, as far as I know, a 32-bit OS can only address 2Gb of memory, so it would be useless to install that huge amount of RAM.

A 32-bit OS addresses 4 GB or memory. Normally, about one GB is required for the operating system kernel and core services. Then we can have about 3 GB left for applications.

An important part of the problem here is Windows. By default, the 32-bit versions of Windows (including XP, Vista and 7) can only use 2 GB for applications. Fortunately, this can be improved. To use 3 GB for applications, you must edit the BOOT.INI system file and add a /3GB flag. This is documented in Microsoft's MSDN website:

http://msdn.microsoft.com/en-us/library/ms791558.aspx

I found also a blog entry with very interesting information and step-by-step procedures:

http://dwf.blogs.com/beyond_the_paper/2009/04/enabling-3gb-switch-on-windows-vista.html

PixInsight Standard for Windows 32-bit can make use of the 3 GB when available, as it, along with all standard process modules, has been linked with the IMAGE_FILE_LARGE_ADDRESS_AWARE flag enabled. The old PixInsight LE application can only address 2 GB.

Disclaimer: Always be aware that changing system configuration files is a risky task. If you make a mistake, your computer may not be able to boot. Be careful, and do it at your own risk.

Having said all that, I must say that, in my opinion, 2 or 3 GB of RAM is too small for any serious image processing. My general recommendation is:

- A 64-bit operating system and a 64-bit version of PixInsight.

- At least 6 GB of RAM. Much better 8 GB.

- At least 2 physical drives dedicated to swap file storage, either running in parallel with PixInsight's parallel disk access option enabled (Preferences), or mounted as a RAID 0 unit.

For large mosaic construction and large HDR compositions, I'd recommend 16 GB of RAM.

Recently I have been making successful experiments with the tmpfs filesystem on Linux. It works like a RAM disk out-of-the-box (no additional software required), and it if f*a*s*t indeed :)
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline xatamec

  • Member
  • *
  • Posts: 52
Re: Out of memory problems / Problemas de memoria insuficiente
« Reply #18 on: 2009 December 02 06:25:12 »
Gracias por la aclaración Juan  ;)

Simplemente con saber que el asunto no se da por resuelto y que se acometerá su resolución en cuanto sea posible me doy por satisfecho  :D
Cada vez me planteo mas seriamente la posibilidad de disparar tomas cortas en cualquier tipo de objeto sin que sean los clásicos M42 o M31. Con DSLRs el rango dinámico es escaso y de esta forma podría recuperar las estrellas fácilmente.
También te agradezco la aclaración sobre la capacidad de direccionamiento de memoria de un SO de 32 bits, obviamente yo había confundido esta capacidad con la asignación que Windows hace para aplicaciones, tal y como tú explicas.

Saludos,
Sergi


Hola Sergi

Quote
Pues yo tengo el problema de memoria cuando utilizo el script HDR Composition, tanto en Windows XP como en Vista de 32bits, con un ordenador dual core con 2Gb de RAM y PixInsight 1.5.9, a pesar de haber actualizado los SO con los últimos SP disponibles y de haber instalado el paquete redistribuible de Visual C++ que recomienda Juan.

El problema aquí es el script HDRComposition. No es que no funcione, que lo hace excepcionalmente bien, sino que tiene unos requerimientos de memoria ciertamente muy exagerados. Las razones tienen que ver con el hecho de que, de por sí, las transformaciones de wavelets que se utilizan requieren mucha memoria (cada capa es un duplicado de la imagen en 32 bits), y además, sobre todo, que el motor de JavaScript es problemático con el uso de la memoria. Es muy probable que se pueda optimizar el script para reducir el consumo de memoria, pero de momento no lo hemos hecho por falta de tiempo. Trataré de echarle un vistazo lo antes posible.

La solución, como ha apuntado David, es implementar este algoritmo en C++ como un módulo independiente. Esto es urgente, dada la importancia de esta tarea, pero en este momento no me es posible acometerla por falta de tiempo. Básicamente en este momento todo el tiempo lo estoy dedicando a realizar nuevos videotutoriales, lo cual es la máxima prioridad ahora.

Así que paciencia, esto se solucionará y tendremos el mejor sistema de composición HDR con un consumo de memoria razonable, pero las prioridades son las prioridades, y yo sólo soy uno, y mis días son de entre 12 y 20 horas laborables. Esto es lo que hay :)


Offline RBA

  • PixInsight Guru
  • ****
  • Posts: 511
    • DeepSkyColors
Re: Out of memory problems / Problemas de memoria insuficiente
« Reply #19 on: 2009 December 04 16:51:04 »
More memory problems here...

I was trying to build a 2x2 mosaic (each 32b TIFF is around 14mb, 4000x2600 pixels in size +/-).

I combined the first two panes ok. I balanced them successfully with PixelMath... I was happy.

When combining the third pane with the combination of the first two, it took 17 attempts to find a valid set of pair matches, and when it went for the #18 it indicated it would use 12000 stars, and shortly after that I've got the dreadful "Out of Memory" message.

I tried limiting the maximum number of stars to 2000, but then a match couldn't be found.
Then I tried 5000, 8000, 10000... Same results.

One thing I noticed is that eventually I would get the "Out of memory" when it starts the structure map, at 2%. Then I would close PI, restart it, load the two images, set the same parameters, execute it, and then it will finish the structure map and all, and get the out of memory message after the X try. After several tries with different "maximum stars", the out of memory error would happen again at the 2% of building the structure map, and again, the only cure for that is to restart the program. So besides running into a "real" memory problem, I think there's a bug somewhere. I can be very detailed about the steps to reproduce the problem if needed.

I have also had out of memory problems using the HRDComposite in the past, to the point of giving up on that.

Win32 XP w/2GB RAM.


Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Out of memory problems / Problemas de memoria insuficiente
« Reply #20 on: 2009 December 05 04:36:13 »
Nota: Dado el interés que tiene este tema y los problemas que plantea Rogelio, hemos decidido hacer la traducción de la respuesta original al Español. Versión en Español al final.

Hi Rogelio,

You have two different problems here:

Quote
Win32 XP w/2GB RAM.

Quote
When combining the third pane with the combination of the first two, it took 17 attempts to find a valid set of pair matches, and when it went for the #18 it indicated it would use 12000 stars ...

I have good news and bad news. The good news is that both problems have very easy solutions. The bad news is that the solution to the first problem will cost you money. Let's analyze the facts.

The bad news first. We need a little arithmetic. Your mosaic frames are 4000x2600 pixels in size (roughly). They are 32-bit images (either floating point or integer). Since you use a STL 11K camera (your image geometry confirms that), I assume you're working with RGB color images (3 channels). Then we have:

Amount of RAM required for one image: 4000x2600x4x3 -> 119 MB

Probable amount of RAM required for a 4-frame mosaic, taking into account rotation of mosaic frames -> 500 MB

Note that we are neglecting all auxiliary and control data structures, as image window and view objects, screen bitmaps, lookup tables and buffers, statistics, histograms, and quite a bunch of complex data structures that PI uses internally for each image.

Note also that unless you're building a one-row mosaic, the amount of memory required to store a 3-frame mosaic and a 4-frame mosaic is roughly the same (the only difference is in the additional room required to rotate the fourth frame). So you need 500 MB allocated in three contiguous chunks of some 167 MB to generate your 3-frame mosaic.

Let's make a step-by-step description of what you do to build your mosaic:

1. You turn on your computer. Windows XP 32-bit reserves approximately one gigabyte for its own use, including its kernel and all core services and device drivers. It can be somewhat less or more, depending on how you have configured your system. Then your firewall/antivirus program is loaded and executed (because you're running one, aren't you?). It will consume some memory, depending on the particular application you're using. If you have other applications or services configured to run at startup, they will also need some additional memory. Both your antivirus/firewall and the rest of resident applications will reduce the amount of free RAM available to applications.

2. You execute the PixInsight Core application. As of version 1.5.9.561, the 64-bit version of PixInsight Core for Linux (the reference implementation) has a RAM footprint of approximately 100 MB. I haven't measured the footprint on Windows 32-bit, but it should be similar.

3. You open your first two mosaic frames. This consumes roughly 240 MB of RAM.

4. You generate a two-frame mosaic. This is another 240 MB.

5. Of course, you close your two first mosaic frames, to save memory. This frees six contiguous chunks of 40 MB each, one for each channel of your first two mosaic frames. Note, however, that the six chunks won't form, in general, a contiguous hole of 240 MB. This is known as memory fragmentation, and is a problem inherent to all dynamic allocation systems.

6. You open your third mosaic frame. It occupies three of the 40 MB chunks that you freed in step 5. This is 120 MB.

7. You launch StarAlignment again to generate a 3-frame mosaic. Your mosaic requires three free contiguous holes of some 165 MB each, or a total of some 500 MB.

8. You get an out of memory error because Windows XP 32-bit won't allow an application to allocate 900 MB of physical RAM in a system where the maximum RAM available to applications is less than 1 GB. End of the story.

Let me introduce Vega to you. Vega is our physical Windows test machine here at our office (we have other Windows machines, but all of them are virtual ones). It is a nicely built Intel Core 2 6300 @ 1.86 GHz with 2 GB of RAM. It is, by today's standards, how to say, not at the bleeding edge of technology. Vega runs Windows Vista Business x64 up-to-date with SP2 installed.

Below you have a screenshot that shows Vega's main screen after building not one, neither two but three mosaics even larger than your mosaic. And it has only 2 GB of RAM:

http://forum-images.pixinsight.com/legacy/mosaic_64/mosaic_64-1.png

If you don't trust me, here's a screenshot with the task manager open (sorry, it's in Spanish):

http://forum-images.pixinsight.com/legacy/mosaic_64/mosaic_64-2.png

Note also that there are two instances of PixInsight running. I used the other instance to copy and save the screenshot images.

The mosaics are composed of two 64-bit floating point images of 4000x4000 pixels each. Each mosaic requires some 743 MB of RAM as you see. On the above screenshot, the first instance of PixInsight is using 3 GB of RAM, just to store pixel data. Of course, a lot of disk swapping is necessary to achieve that. Vega has an enterprise-class Western Digital 750 GB SATA disk. After completing the second mosaic, the PixInsight Core application was perfectly responsive. After the third mosaic and a few minutes waiting for Vista to stabilize, it was usable although the GUI was somewhat slow. Vista's pagefile.sys file was about 4 GB at this point.

This is just to demonstrate you the power of a 64-bit operating system. The 64-bit version of PixInsight has no practical memory limits, other than the fact that when you have consumed your physical RAM, a lot of disk swapping is necessary, and that slows down everything.

So my advice is to buy or build a new computer. Throw a minimum of 8 GB on a modern and efficient motherboard with at least a quad-core processor and install a 64-bit operating system. If you insist in using Windows, buy a license of Windows 7 x64.

In the meanwhile, you can build your mosaic with 16-bit integer images on your WinXP32/2GB machine without problems (once you've solved the second issue, see below).

=======================

Now your second problem. This is very easy to fix, and I explain how in my third video on mosaic construction (which I'm going to continue working on as soon as I finish this post).

You just have to define two previews: one on your 2-frame mosaic image and one on your third mosaic frame. Each preview must cover (roughly) the overlapped area between both images. Then select the mosaic's preview as the reference image in StarAlignment, and apply it to the frame's preview. The mosaic in the above screenshot has been generated in this way, as it has minimal overlapping (< 2%).

When StarAlignment is executed on previews, it looks for star pair matches on the areas covered by the previews, but performs the image registration on the previews' parent images. This system allows us to build huge mosaics with no practical limit. For example, the two-frame mosaic that you can see on the screenshots above is part of a 256-megapixel, 16-frame mosaic.

StarAlignment has been designed for maximum registration accuracy, not as a "throw me anything and I'll align it anyway" system.

Sorry for being a bit technical, but there's no other way to explain this. StarAlignment's star pair matching system requires the number of outliers (false pair matches) in the initial set of putative star pair matches to be not too large. This is because the registration model (an eight-parameter homography) is computed with a special implementation of the RANSAC algorithm. RANSAC ensures that no false star match will enter the registration model, which greatly improves accuracy. However, RANSAC is sensitive to a large number of outliers in its input set. To overcome this limitation with a minimal user intervention, I designed and implemented the preview-based registration model that I've described in the preceding paragraphs.

As I've said I describe all of this in detail in the third video. Let me know if you need further information.



====================================================================



Hola Rogelio,

Tienes dos problemas diferentes aquí:

Quote
Win32 XP w/2GB RAM.

Quote
When combining the third pane with the combination of the first two, it took 17 attempts to find a valid set of pair matches, and when it went for the #18 it indicated it would use 12000 stars ...

Tengo buenas y malas noticias. La buena noticia es que ambos problemas tienen soluciones muy sencillas. La mala noticia es que la solución al primer problema te costará dinero. Analicemos los hechos.

Primero las malas noticias. Necesitamos un poco de artmética. Cada uno de los elementos de tu mosaico tiene 4000x2600 pixels (más o menos). Son imágenes de 32 bits (enteras o en punto flotante). Como usas una cámara STL 11K (la geometría de tus imágenes lo confirma), asumo que estás trabajando con imágenes RGB en color (3 canales). Entonces tenemos:

Cantidad de RAM necesaria para una imagen: 4000x2600x4x3 -> 119 MB

Cantidad probable de RAM necesaria para un mosaico de 4 elementos, teniendo en cuenta la rotación de los elementos del mosaico -> 500 MB

Ten en cuenta que estamos pasando por alto todas las estructuras auxiliares de control, como las ventanas de imagen, las vistas, los bitmaps de pantalla, las tablas lookup y los buffers, los histogramas, estadísticas y un buen puñado de estructuras de datos que PI usa internamente para cada imagen.

Ten en cuenta también que a menos que estés construyendo un mosaico de una fila, la cantidad de memoria necesaria para almacenar un mosaico de tres elementos es la misma, aproximadamente, que la que se necesita para un mosaico de cuatro elementos (la única diferencia es el espacio adicional necesario para girar el cuarto elemento). De manera que necesitas 500 MB ubicados en tres bloques contiguos de memoria de unos 167 MB cada uno para generar tu mosaico de tres elementos.

Hagamos una descripción paso a paso de lo que haces para construir tu mosaico:

1. Enciendes tu ordenador. Windows XP de 32 bits reserva aproximadamente un gigabyte para su propio uso, incluyendo el kernel y los servicios del mismo, así como todos los controladores de dispositivo. Puede ser algo más o algo menos, dependiendo de cómo tengas configurado tu sistema. Entonces tu programa de firewall/antivirus es cargado y ejecutado (porque estás usando uno, ¿verdad?). Consume alguna memoria, dependiendo de la aplicación en particular que estés usando. Si tienes otras aplicaciones o servicios configurados para ejecutarse en el inicio, también van a necesitar alguna memoria. Tanto tu antivirus/firewal como el resto de las aplicaciones residentes van a reducir la cantidad de memoria libre disponible para las aplicaciones.

2. Ejecutas la aplicación PixInsight Core. La versión 1.5.9.561 de 64 bits de PixInsight Core para Linux (la implementación de referencia) tiene un "footprint" en RAM de aproximadamente 100 MB. No he medido el footprint en Windows de 32 bits, pero debería ser similar.

3. Abres los dos primeros elementos de tu mosaico. Esto consume unos 240 MB de RAM.

4. Generas el primer mosaico de dos elementos. Esto supone otros 240 MB.

5. Por supuesto, ahora cierras los dos primeros elementos del mosaico, para ahorrar memoria. Esto libera seis bloques contiguos de 40 MB cada uno, uno para cada canal de tus dos primeros elementos de mosaico. Ten en cuenta, sin embargo, que estos seis bloques no van a formar, necesariamente, un agujero de 240 MB contiguos. Esto se conoce como fragmentación de memoria, y es un problema inherente a todos los sistemas que realizan ubicación dinámica.

6. Ahora abres el tercer elemento del mosaico. Ocupa tres de los bloques de 40 MB que has liberado en el paso 5. Esto son 120 MB.

7. Lanzas StarAlignment de nuevo para generar un mosaico de tres elementos. Tu mosaico requiere tres agujeros de unos 165 MB contiguos cada uno, o un total de unos 500 MB.

8. Recibes un error de falta de memoria porque Windows XP de 32 bits no va a permitir que una aplicación ubique 900 MB de RAM física en un sistema donde la cantidad máxima de RAM disponible para aplicaciones está por debajo de 1 GB. Fin de la historia.

Permíteme que te presente a Vega. Vega es nuestra máquina física para pruebas con Windows aquí en nuestra oficina (tenemos otras máquinas de Windows, pero todas son virtuales). Es una máquina muy bien construida con un Intel Core 2 6300 a 1.86 GHz con 2 GB de RAM. Se trata de una máquina que para los estándares actuales, cómo decirlo, no está al filo de la tecnología precisamente. Vega corre Windows Vista Business x64 actualizado con SP2 instalado.

A continuación tienes una copia de pantalla que muestra la pantalla principal de Vega tras haber construido no uno, ni dos, sino tres mosaicos más grandes que el tuyo. Y sólo tiene 2 GB de RAM:

http://forum-images.pixinsight.com/legacy/mosaic_64/mosaic_64-1.png

Si no me crees, aquí tienes una copia de pantalla con el administrador de tareas de Wndows abierto:

http://forum-images.pixinsight.com/legacy/mosaic_64/mosaic_64-2.png

Ten en cuenta también que hay dos instancias de PixInsight en ejecución. Usé la otra instancia para copiar y guardar las copias de pantalla.

Los mosaicos están compuestos por dos imágenes de 64 bits en punto flotante de unos 4000x4000 píxeles cada una. Cada mosaico requiere unos 743 MB de RAM como puedes ver. En la copia de pantalla anterior, la primera instancia de PixInsight está utilizando 3 GB de RAM, tan sólo para almacenar datos de píxel. Por supuesto, es necesario mucho intercambio de datos en disco para conseguir esto. Vega monta un disco SATA Western Digital de clase enterprise de 750 GB. Tras completar el segundo mosaico, la aplicación PixInsight Core era perfectamente utilizable. Tras el tercer mosaico, y después de esperar unos minutos hasta que Vista se estabilizara, era también utilizable aunque la interfaz gráfica iba algo lenta. El archivo pagefile.sys de Vista tenía unos 4 GB en este momento.

Esto es sólo para demostrarte la potencia de un sistema operativo de 64 bits. La versión de 64 bits de PixInsight no tiene límite práctico de memoria, aparte del hecho de que cuando se consume la RAM física es necesario mucho intercambio con los discos, lo cual enlentece todo en gran medida.

Así que mi consejo es que compres o construyas un nuevo ordenador. Pon un mínimo de 8 GB en una placa base moderna y eficiente con al menos un procesador quad-core e instala un sistema operativo de 64 bits. Si insistes en usar Windows, compra una licencia de Windows 7 x64.

Mientras tanto, puedes construir tu mosaico sin problemas con imágenes de 16 bits en tu máquina WinXP32/2GB (una vez que hayas resuelto el segundo problema, lee más abajo).

=======================

Ahora tu segundo problema. Éste es muy fácil de resolver, y explico cómo hacerlo en mi tercer vídeo sobre construcción de mosaicos (el cual voy a continuar haciendo tan pronto como termine este mensaje).

Tan sólo tienes que definir dos previsualizaciones (previews): una para tu mosaico de dos elementos, y otra para el tercer elemento de tu mosaico. Cada previsualización debe cubrir (más o menos) el área de superposición entre ambas imágenes. Entonces selecciona la previsualización del mosaico como la imagen de referencia de StarAlignment, y aplícalo a la previsualización del tercer elemento del mosaico. El mosaico de las copias de pantalla anteriores ha sido generado de esta manera, ya que tiene una mínima superposición (< 2%).

Cuando StarAlignment es ejecutado sobre previsualizaciones, busca parejas de estrellas coincidentes en las áreas cubiertas por las previsualizaciones, pero lleva a cabo el registro de las imágenes madre de las mismas. Este sistema nos permite construir mosaicos enormes sin límite práctico. Por ejemplo, el mosaico de dos elementos que puedes ver en las copias de pantalla anteriores forma parte de un mosaico de 256 megapíxeles y 16 elementos.

StarAlignment ha sido diseñado para la máxima precisión de registro, no como un sistema del tipo "échame cualquier cosa y yo la alinearé sea como sea".

Perdón por ser un poco técnico, pero no hay otra forma de explicar esto. El sistema de emparejamiento de estrellas de StarAlignment requiere que el número de outliers (falsas parejas) en el conjunto inicial de parejas coincidentes de estrellas no sea demasiado grande. Esto es porque el modelo de registro (una homografía con 8 parámetros) es calculado con una implementación especial del algoritmo RANSAC. RANSAC asegura que ninguna falsa pareja de estrellas entrará en el modelo de registro, lo cual aumenta la precisión considerablemente. Sin embargo, RANSAC es sensible a un gran número de outliers en su conjunto de entrada. Para superar este problema con una intervención mínima del usuario, diseñé e implementé el modelo de registro basado en previsualizaciones que he descrito en los párrafos anteriores.

Como he dicho voy a describir todo esto en el tercer vídeo. Dime si necesitas más información.
« Last Edit: 2009 December 05 10:26:51 by Juan Conejero »
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: Out of memory problems / Problemas de memoria insuficiente
« Reply #21 on: 2009 December 05 10:59:56 »
Hi Juan,

thanks for this very helpful discussion of the memory problem!

 I guess always assumed that PI was using its swap directory (Edit/Global Preferences/Directories and Network) to unload images that are currently not used.  So what is the PI swap directory used for?

Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Out of memory problems / Problemas de memoria insuficiente
« Reply #22 on: 2009 December 05 11:33:57 »
Hi Georg,

Thanks. In PixInsight, swap files are used for temporary storage of image states. When you apply a process that modifies an image's pixel contents, the current image is saved as a swap file (or as a set of swap files if you're using parallel swap file access with several physical drives). When you eventually undo the applied process, or if you navigate the image's processing history, the swap file is reloaded from disk when necessary. In this way PixInsight has unlimited undo/redo capabilities, disk space permitting.

Sending unused images to swap files is something I've considered. For example, iconized images could be handled in this way. In fact, implementing this wouldn't be very difficult because all required components are already available in the core application. So far I haven't decided to implement this functionality for performance reasons, but given that we have parallel disk i/o now, perhaps I'll reconsider it. Don't expect miracles from this technique, though. For example, the mosaic problem that we've discussed wouldn't improve, as all images are actually necessary to build the mosaic. So 64-bit rules! :)
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Niall Saunders

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1456
  • We have cookies? Where ?
Re: Out of memory problems / Problemas de memoria insuficiente
« Reply #23 on: 2009 December 05 17:20:20 »
Hi Juan
Quote
So 64-bit rules!

I have to agree - I just installed an extra 4Gb of RAM, taking my total up to 8Gb on Vista64 - its just like adding a shot of Nitrous Oxide to the system. Worth every penny spent - I just wish I had done it a few months ago, when memory prices had been so much lower.

But it was still a great move.

Cheers,
Cheers,
Niall Saunders
Clinterty Observatories
Aberdeen, UK

Altair Astro GSO 10" f/8 Ritchey Chrétien CF OTA on EQ8 mount with homebrew 3D Balance and Pier
Moonfish ED80 APO & Celestron Omni XLT 120
QHY10 CCD & QHY5L-II Colour
9mm TS-OAG and Meade DSI-IIC

Offline RBA

  • PixInsight Guru
  • ****
  • Posts: 511
    • DeepSkyColors
Re: Out of memory problems / Problemas de memoria insuficiente
« Reply #24 on: 2009 December 05 22:27:11 »
Gracias Juan for your detailed answer.
Spanish usually is not a problem for me ;-)

I do plan to get a new computer this xmas, not particularly to avoid this memory problem but for performance in general. For the 3x4 mosaic I did not long ago with the California nebula and the Pleiades, I had to reduce the files in half at the very beginning so that I could actually work without waiting 5 minutes after every little thing I did (not limited to PI btw).

BTW I like the "trick" of using previews, I'll try that next time!  ;)

"If you insist in using Windows..."

You don't want to get me started on Windows, Microsoft, etc.  ;D 13 years ago I was working for a startup called Netscape. Need I say more?  O0 I actually have two computers at home running Linux (one's our "gateway", the other one is for my kids), but still, there's a large number of apps I use that are only available in Windows, so that's what I have in my main desktop.

Offline xatamec

  • Member
  • *
  • Posts: 52
Re: Out of memory problems / Problemas de memoria insuficiente
« Reply #25 on: 2009 December 12 15:55:44 »
Hola Juan,

Tengo problemas de "Out of memory" haciendo simplemente un StarAlignment con 3 imágenes monocromas tomando una de ellas como referencia.
Esto no me había pasado con versiones previas que había evaluado antes de comprar la licencia y usar la versión 1.5.9.0553.

Saludos,
Sergi

Edito:
No me había dado cuenta de algo importante y es justo que lo comente.
Hace unos días estuve haciendo unas pruebas de drizzlex2 con mi programa de apilado. Al apilar las imágenes monocromas de las que hablaba no me había dado cuenta que la opción drizzlex2 seguía activa, por lo que las imágenes eran 4 veces mas grandes que la resolución original. Aún así, al ser de 16bits de profundidad, ocupan poco mas que una imagen a color a la resolución original.
« Last Edit: 2009 December 13 06:51:10 by xatamec »