Out of memory

If you need help on how to use the program
Post Reply
MrObama2022
Posts: 58
Joined: 2022-02-02 00:03:55

Out of memory

Post by MrObama2022 »

My catalog has 30k entries ... I think it's big :D
Images are stored externally, they are linked and are stored in directories, not inside the catalog
AMC catalog is 81 Mb.

The problem is when I use Ant it often goes out of memory. While script is running or while I'm looking at stored entries.

I tried giving above normal priority in Windows task manager, but nothing changed.

I'm using Win 8 64 bit, my PC has 16gb of ram. In task manager, in memory tab, I see these values:
Commit (310.500 KB), Working set (325.748 KB), Shared (17.440 KB), Private (308.308 KB)

These doesn't seem huge numbers.

So ... anyone with my problem?
antp
Site Admin
Posts: 9651
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Re: Out of memory

Post by antp »

Strange, with the image as external files it should work fine then.
Changing priority is not a good idea though, better keep it on "normal" ;)
I don't really have an idea.
How much memory is AMC using? As it is a 32-bit process it is limited to 2 GB anyway, but it should be enough with pictures as external files.
MrObama2022
Posts: 58
Joined: 2022-02-02 00:03:55

Re: Out of memory

Post by MrObama2022 »

Hi antp, the memory used by MovieCatalog are:
Commit (310.500 KB), Working set (325.748 KB), Shared (17.440 KB), Private (308.308 KB)

Can you compile as 64bit? Maybe I can get rid of this problem.

I'll do further tests asap. I want to check the catalog size to check the impact.

I'll create a test catalog of 10k entries with no pictures at all and I'll try to launch my script on 2k entries to see if it fails. Maybe the problem is on memory usage with script library ...
MrObama2022
Posts: 58
Joined: 2022-02-02 00:03:55

Re: Out of memory

Post by MrObama2022 »

Ok, I just tested with an AMC file with 12000 entries and no images. I launched the script on 400 entries (batch mode) and after 197 entries it runned out of memory.

Is there a sort of garbage collector or clean utility I can add to the script? How can I measure the memory size inside my scripts?
fulvio53s03
Posts: 764
Joined: 2007-04-28 05:46:43
Location: Italy

Re: Out of memory

Post by fulvio53s03 »

MrObama2022 wrote: 2022-04-19 13:15:50 Ok, I just tested with an AMC file with 12000 entries and no images. I launched the script on 400 entries (batch mode) and after 197 entries it runned out of memory.
Is there a sort of garbage collector or clean utility I can add to the script? How can I measure the memory size inside my scripts?
really strange. My catalog has 11.500 movies, each of them with 1 image (contained in catalog) and uses a little more than 800,00 GB.
There is no problem.
My O.S. is Win 10.
P.S.
obviousely I'm interested in garbage collection and in measuring memory size used in scripts. :clapping:
:??:
MrObama2022
Posts: 58
Joined: 2022-02-02 00:03:55

Re: Out of memory

Post by MrObama2022 »

I just executed again my script on my test catalog and I got an out of memory after 563 entries processed (in batch mode) :rolleyes: .
MrObama2022
Posts: 58
Joined: 2022-02-02 00:03:55

Re: Out of memory

Post by MrObama2022 »

I checked in task manager and MovieCatalog uses 1200000 Kb when out of memory.
fulvio53s03
Posts: 764
Joined: 2007-04-28 05:46:43
Location: Italy

Re: Out of memory

Post by fulvio53s03 »

MrObama2022 wrote: 2022-04-19 23:17:46 I checked in task manager and MovieCatalog uses 1200000 Kb when out of memory.
maybe a swap file problem? :innocent:
did you see: https://forum.antp.be/phpbb3/viewtopic. ... ory#p46933
https://ntcore.com/?page_id=371 ?
MrObama2022
Posts: 58
Joined: 2022-02-02 00:03:55

Re: Out of memory

Post by MrObama2022 »

Thank you Fulvio, I'll try asap. This could really help. :grinking: :grinking: :grinking:

By the way, I released a new version of ItalianMultisite and some of its libraries [ https://forum.antp.be/phpbb3/viewtopic.php?f=12&t=30608 ]
MrObama2022
Posts: 58
Joined: 2022-02-02 00:03:55

Re: Out of memory

Post by MrObama2022 »

I tried 4gb patch but now when AMC reaches 1.2 gb of RAM I get an access violation error, and a bigger crash of AMC.

By the way, with standard AMC there is a another problem with the out of memory error: sometimes AMC reset/lost scripts parameter and option values and I have to manually set them again.
antp
Site Admin
Posts: 9651
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Re: Out of memory

Post by antp »

AMC is build with Delphi 7, which is quite old, so porting it to a newer 64-bit version of Delphi would require a lot of work.
Post Reply