Questions tagged [pool]

A pool describes a cache of resources that an application can draw from to save instantiation time.

Pools typically refer to database connections but the term can be applied to graphics handles, files and other run-time processes. When the use of such a resource is complete but the application is still running, it will typically return the resource to the pool rather than release it.

1504 questions
9
votes
3 answers

Regarding Java String Constant Pool

This is regarding the Java String Constant Pool. In one of my Programs i am decrypting the password for the database and storing it in a String. I heard that the Java Strings will be stored in a Constant pool and they won't be destroyed the VM…
Dungeon Hunter
  • 19,827
  • 13
  • 59
  • 82
9
votes
1 answer

How can I fix "TypeError: cannot serialize '_io.BufferedReader' object" error when trying to multiprocess

I'm trying to switch the threading in my code to multiprocessing to measure its performance and hopefully achieve better brute-forcing potential as my program is meant to brute-force password protected .zip files. But whenever I try to run the…
Arszilla
  • 159
  • 1
  • 2
  • 12
9
votes
1 answer

Airflow: how to specify quantitative usage of a resource pool?

I am looking at several open source workflow schedulers for a DAG of jobs with heterogeneous RAM usage. The scheduler should not only schedule less than a maximum number of threads, but should also keep the total amount of RAM of all concurrent…
TemplateRex
  • 69,038
  • 19
  • 164
  • 304
9
votes
1 answer

Python Multiprocessing Pool Doesn't Create Enough Processes

I am running calculations on 40GB worth of data. Each file is a compressed gzip file containing lines of json. Each file has a maximum of 500,000 lines, or about 500MB. I have an amazon instance running with 128 cpu's and 1952 GB of memory. What I'm…
Gabriel
  • 624
  • 1
  • 7
  • 20
9
votes
1 answer

python process pool with timeout on each process not all of the pool

I need to run many processes, but not all together, for example 4 processes at same time. multiprocessing.Pool is exactly what I need. But the problem is that I need to terminate a process if it lasts more than a timeout (e.g. 3 seconds). Pool just…
iman
  • 21,202
  • 8
  • 32
  • 31
9
votes
3 answers

Why a pool of stateless EJB is needed

I know that: For stateless session beans the server can maintain a variable amount of instances in a pool. Each time a client requests such a stateless bean (e.g. through a method) a random instance is chosen to serve that request. My…
GionJh
  • 2,742
  • 2
  • 29
  • 68
9
votes
1 answer

what's difference between windows thread pool and CLR thread pool

I read some segments about window thread pool. It looks like CLR thread pool. CLR is based on Windows, so CLR thread is based on windows thread pool, is it right? I know that each .net process has one thread pool, what's the situation in windows…
roast_soul
  • 3,554
  • 7
  • 36
  • 73
9
votes
4 answers

python multiprocessing.Pool kill *specific* long running or hung process

I need to execute a pool of many parallel database connections and queries. I would like to use a multiprocessing.Pool or concurrent.futures ProcessPoolExecutor. Python 2.7.5 In some cases, query requests take too long or will never finish…
dragoljub
  • 881
  • 7
  • 5
9
votes
6 answers

One big pool or several type specific pools?

I'm working on a video game which requires high performance so I'm trying to setup a good memory strategy or a specific part of the game, the part that is the game "model", the game representation. I have an object containing a whole game…
Klaim
  • 67,274
  • 36
  • 133
  • 188
9
votes
1 answer

Profiling a python multiprocessing pool

I'm trying to run cProfile.runctx() on each process in a multiprocessing pool, to get an idea of what the multiprocessing bottlenecks are in my source. Here is a simplified example of what I'm trying to do: from multiprocessing import Pool import…
Fragsworth
  • 33,919
  • 27
  • 84
  • 97
9
votes
2 answers

Thread Pool vs Many Individual Threads

I'm in the middle of a problem where I am unable decide which solution to take. The problem is a bit unique. Lets put it this way, i am receiving data from the network continuously (2 to 4 times per second). Now each data belongs to a different,…
h.i
  • 515
  • 1
  • 5
  • 16
9
votes
4 answers

Python multiprocessing: how to limit the number of waiting processes?

When running a large number of tasks (with large parameters) using Pool.apply_async, the processes are allocated and go to a waiting state, and there is no limit for the number of waiting processes. This can end up by eating all memory, as in the…
André Panisson
  • 876
  • 9
  • 22
8
votes
2 answers

Good Client Socket Pool

I need to manage long running TCP socket connections to an external server from my Java application. I'm looking for a good socket pool so I will be able to re-use the sockets. Are there any suggestions?
David Rabinowitz
  • 29,904
  • 14
  • 93
  • 125
8
votes
4 answers

Error max pool size was reached?

I think this is because im not closing conections to my DB. I posted code im using below for my Datalayer. Do i need to close my conection? How would i do it too? Is this the code causing problems? Heres the error code: Timeout expired. The timeout…
CsharpBeginner
  • 1,753
  • 8
  • 38
  • 68
8
votes
2 answers

Is it possible to list all database connections currently in the pool?

I'm getting ActiveRecord::ConnectionTimeoutError in a daemon that runs independently from the rails app. I'm using Passenger with Apache and MySQL as the database. Passenger's default pool size is 6 (at least that's what the documentation tells me),…
Erik B
  • 40,889
  • 25
  • 119
  • 135