lucene-pylucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Heimes <>
Subject Re: PyLucene, multiprocessing, high thread count
Date Fri, 15 Jul 2011 13:47:09 GMT
Am 15.07.2011 10:10, schrieb Andi Vajda:
> PyLucene embeds a Java VM. Thus, with each subprocess, a new JVM is created with all
its threads. This can get insane pretty quickly.

The Java VM starts a lot of threads. On my Linux box eleven threads
additional threads are running after initVM() has been called.

>>> import lucene, os, psutil
>>> psutil.Process(os.getpid()).get_num_threads()
>>> lucene.initVM()
<jcc.JCCEnv object at 0x7f23a66f31e0>
>>> psutil.Process(os.getpid()).get_num_threads()


View raw message