Re: Problem using ontology in multi-process environment

Posted by fabad on
URL: http://owlready.306.s1.nabble.com/Problem-using-ontology-in-multi-process-environment-tp3198p3217.html

Thanks for your answer, Jiba, and sorry for the error in my code. I wrote my previous comment by heart as I did not have my code in front of me...

I though the same as you, each process would have their own memory space, but I tried and surprisingly it worked. Actually I am not sure if the fork is copying the memory space or if that space is actually shared between the processes.

To be honest, I think the memory space is being shared between the processes because the memory usage is not too high. In previous attempts, I passed the ontology file path to each process, and each process open it, which resulted in a high memory consumption. In fact, I could not execute more than 5 processes because my computer run out of memory as each process was opening the ontology. Now, using the memory address of the ontology, the memory usage remains more or less stable with independence of the number of processes I throw.

By the way, I am using linux, ubuntu concretely. I can do some experiments to check what happens if a process modify the ontology.