memory problems and swap overfull
Up one level
memory problems and swap overfull
Hello,<br>I'm running ELAN 3.5.0 under Linux (Centos 5) and I enjoy it a lot. Except that after a while it stops running and even the operating system stops.<br>I found out that the working memory (i have 512Mb) is getting full and then the swap memory (2.0Gb) is getting filled, too. This happens even when I only switch between annotations back and forth.<br>I thought about buying some more memory and get it installed in my computer. But as it seems, this could only retard the crash.<br>Hope someone can help me in solving this problem.<br>Best,<br>Jan<br>
Re: memory problems and swap overfull
Hello,
ELAN is an application written in the Java programming language. It is not unusual that you see memory consumption increase when e.g. activating annotations, back and forth. At a certain point however, the so-called "garbage collector" should clean up unused objects and free memory. Apparently this does not work in your situation, I cannot explain that. I could understand the application running out of the available memory in certain circumstances but I don't understand that the swap memory is getting filled.
Have you installed the ELAN version with an included JRE, or does ELAN run on another, pre-installed JRE?
Any problems with other Java applications?
Han
Re: Re: memory problems and swap overfull
Hi,<br>thanks for the reply.<br><br>The ELAN version that I installed was the one without virtual machine.<br>When I launch ELAN, the following is written on the command line:<br><br>[jan@stf-lin-9-185 ELAN 3.5.0]$ raw jre dir: /home/jan/jdk1.6.0_07/bin//java<br>jre dir: /home/jan/jdk1.6.0_07/bin//java<br>LD_LIBRARY_PATH: /home/jan/ELAN/ELAN 3.5.0/jmf__Vlin2.1.1fcs:/home/jan/jdk1.6.0_07/bin//javalib/i386:/home/jan/jdk1.6.0_07/bin//javalib/i386/xawt:/home/jan/jdk1.6.0_07/bin//javalib/i386/client:<br>LD_PRELOAD:<br><br>I'm not sure if this is okay, but the program itself runs quite well. I don't know how often the garbage collection should run over the stack or heap, but I waited for half an hour or so but nothing happened.<br>When I close ELAN I get all the memory back.<br><br>I don't have problems with other java applications - not that I can remember.<br><br>Do you know if I can force java somehow to run the garbage collection more often, or are there other solutions?<br>Best,<br>Jan
Re: Re: Re: memory problems and swap overfull
The output on the command line looks fairly normal.
The garbage collector should normally at least run when the application is getting short of memory; apart from that there are little assumption to make.
There are a few options you can use concerning garbage collection. Best start ELAN with the Elan_Linux_3_5_0.sh script in the ELAN folder. Maybe you should make it executable if it isn't. And you have to change the EJAVA_HOME variable to point to your own jre. On the last line you can add these options:
-Xincgc
this enables an incremental garbage collector, reduces gc pauses
-Xloggc:file
where "file" should point to a file on your file system, this enables gc logging
This script starts ELAN with a max. heap of 256Mb (-Xmx256m), the standard launcher uses 160Mb.
I would be surprised if any of this is the solution.
What you could also try, is to download the version with a jre; it includes a Java 5 (1.5) jre and it would be interesting to know if the same memory problems occur there.
Han
Re: Re: Re: Re: memory problems and swap overfull
Thank you very much for the advice.<br>I tried the installation with the JMF. The problem was the same, but today I found out that it's not only ELAN that fills the memory. Also Acrobat reader did it. Then the CPU is running at 100% after some time. Anyway, I have cut 20 seconds of the audio and video files around the part I am interested. The memory loss was less and it was easier to scroll through the annotations and stuff. But, a new problem emerged. When I pressed the "play" button and the signals played then till the end, another click on the play button (perhaps unluckily because I tried to press "pause" to stop the replay although the replay just stopped itself), the program stops and can only be killed from the comand line - all unsaved data is lost. This happened to me several times, that's why I report it here.<br>The information displayed before is the following:<br><br>20.0014First Position: 0, -1 Duration: 20001<br>New position request: 19.84<br>Seeking pos: 19840 - Real: 18840000<br>Performing Audio seek: -1<br>SetAudioClassic Called... Use another format!<br>20First Position: 0, 0 Duration: 20000<br>Frame Rate: 25<br>New position request: 19.84<br>Seeking pos: 19840 - Real: 18840000<br>End of video stream<br>20First Position: 0, 0 Duration: 20000<br>Frame Rate: 25<br>New position request: 19.84<br>Seeking pos: 19840 - Real: 18840000<br>End of video stream<br>20First Position: 0, 0 Duration: 20000<br>Frame Rate: 25<br>New position request: 19.84<br>Seeking pos: 19840 - Real: 18840000<br>End of video stream<br>End of audio stream<br><br>I think that either the audio file, or the video files have not the same lenght as the other. But as there are 25 images per second and 16000 samples per second, I don't know exactly where to cut. And I think it should work even when the signals are unequal, no?<br>I just wanted to report this.<br>Cheers,<br>Jan<br>
Re: Re: Re: Re: Re: memory problems and swap overfull
If there are other applications that fill the memory and swap then there is probably some external cause for that.
I don't think I recognize the messages like "Seeking pos: 19840 - Real: 18840000", but I suppose they are generated by JMF? Normally it should not be a problem if two video's are not of the same length.
Good luck,
Han