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
6
votes
2 answers

How do you determine the size of the nodes created by a 'std::map' for use with 'boost::pool_allocator' (in a cross-platform way)?

UPDATE Per comments, answer, and additional research, I have come to the conclusion that there is typically no difference between a set and a map in terms of node overhead. My question that follows is really: How do you determine node overhead for…
Dan Nissenbaum
  • 13,558
  • 21
  • 105
  • 181
6
votes
2 answers

Python multiprocessing: max. number of Pool worker processes?

I am making use of Python's multiprocessor library and wondering what would be the maximum of worker processes I can call? E.g. I have defined async.pool = Pool(100) which would allow me to have max 100 async processes running at the same time, but…
opstalj
  • 892
  • 4
  • 13
  • 22
6
votes
0 answers

How to guarantee hadoop FileSystem connections are managed when I use pool

Since FileSystem.get is not thread-safe, I use FileSystem.newInstance instead. but calling newInstance method each time when I need connection to HDFS may not be a good idea. So I made FileSystem connection pool. This is first question. Is this good…
6
votes
2 answers

Java based Database Connection Pool library for multiple database users

Our Java application (web application that runs on Jetty 7.5.4) uses an underlying database. There are multiple databases users and the Java part needs to access the DB using those database users. Am wondering if there is a database connection pool…
prams
  • 235
  • 2
  • 10
6
votes
2 answers

Jenkins - Managing a pool of resources

I'm trying to set up a Jenkins system where a certain program has to be run on a board on the network, accessed using telnet. We're talking about hundreds of such jobs here, therefore we will be setting up multiple boards. Therefore, each job has to…
6
votes
1 answer

Looking for a Linux threadpool api with OS scheduler support

I'm looking for a thread pool abstraction in Linux that provides the same level of kernel scheduler support that the Win32 thread pool provides. Specifically, I'm interested in finding a thread pool that maintains a certain number of running…
John Calcote
  • 793
  • 1
  • 8
  • 15
5
votes
6 answers

Thread-Pool with multiple limits

I want a Thread-Pool that provides a maximum of X Threads to process tasks, so far no problem. However each submitted Task can specify an IO-Target which is specifically limited (say Y). So a submitted IOTask returns the target "google.com" with…
hotzen
  • 2,800
  • 1
  • 28
  • 42
5
votes
1 answer

Persistent Processes Post Python Pool

I have a Python program that takes around 10 minutes to execute. So I use Pool from multiprocessing to speed things up: from multiprocessing import Pool p = Pool(processes = 6) # I have an 8 thread processor results = p.map( function, argument_list…
user
  • 7,123
  • 7
  • 48
  • 90
5
votes
0 answers

readexactly() called while another coroutine is already waiting for incoming data

Use pool connection - aiomysql my code looks like this: # POOL CONNECTION # create pool connection async def create_pool(): print("Creating pool connection...") global pool pool = await aiomysql.create_pool( host=DB_HOST, …
timmy
  • 65
  • 5
5
votes
1 answer

Lock objects should only be shared between processes through inheritance

I am using the multiprocessing.Pool class within an object and attempting the following: from multiprocessing import Lock, Pool class A: def __init__(self): self.lock = Lock() self.file = open('test.txt') def function(self,…
Filibuster
  • 51
  • 1
  • 3
5
votes
1 answer

Java - Redis: Pool of 300+ connections possible?

I find it hard to create a connection pool in Redis with 300+ connections. I am about use it in a volatile environment in a multi-threaded app. Is anyone experienced with a deployment like this that could help me determine if this is possible?…
itsraja
  • 1,640
  • 4
  • 32
  • 48
5
votes
2 answers

Why is giving me this error :TypeError: cannot pickle '_io.TextIOWrapper' object?

I am trying to use multiprocessing and the idea is to get the links from the result of the Bing Search, but changing one of the configurations (cep configuration) using selenium. I have all the cep in a list (filecep) and I wanto to write all of…
Laura
  • 117
  • 1
  • 1
  • 9
5
votes
1 answer

Reusing postgresql pool in other node javascript files

I am creating nodejs backend app with postgresql database. What I want is when once I create connection to database in my db.js file, that I can reuse it in other files to execute queries. This is my db.js file const pool = new Pool({ user:…
lexus_sa
  • 53
  • 1
  • 4
5
votes
1 answer

gcloud kubernetes node pool: high priority for preemptible VM nodes possible

i need a solution for that: i have 2 node pools in gcloud kubernetes, first is preemptible and autoscaling, second is only autoscaling. Jobs should be started on the first one ( with preemptible VMs ), but when no resources on the first pool are…
micha
  • 161
  • 1
  • 2
  • 14
5
votes
2 answers

Python: Multiprocessing Does Not Complete Jobs

I'm using python 2.7 with multiprocessing::Pool to run a job in parallel I've simplified the example below, but here's the main gist of it. It will create a file for each person in my dict using the apply_async() function. However when I check to…