pool

web site file write performance problem

Hi WE use a third party report tool. Report tool uses active-x. At first we generate and run a query accırding to filters, then one report file is created which inculdes the data (result of the query). Then client downloads the report file. But file written operation is a big problem for us. What can we do? Taking file written operations...

Django database connections pool with psycopg2.pool

Hi folks, I'm trying to implement persistent database connection pool with django. One of the options is to use built in psycopg2.pool code which provide different types of pools (PersistentConnectionPool, ThreadedConnectionPool etc ), but there is no psycopg2 documentation on that topic. So, do anyone done any work in this direction ...

How is the java memory pool divided?

I’m currently monitoring a Java application with jconsole. The memory tab let you choose between: Heap Memory Usage Non-Heap Memory Usage Memory Pool “Eden Space” Memory Pool “Survivor Space” Memory Pool “Tenured Gen” Memory Pool “Code Cache” Memory Pool “Perm Gen” What is the different between them ? ...

Keyboard Interrupts with python's multiprocessing Pool

How can I handle KeyboardInterrupt events with python's multiprocessing Pools? Here is a simple example: from multiprocessing import Pool from time import sleep from sys import exit def slowly_square(i): sleep(1) return i*i def go(): pool = Pool(8) try: results = pool.map(slowly_square, range(40)) except Ke...

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 cProfile def square(i): return i*i def square_wrapper(i): cProfile.runctx("result...

When are released objects finally destroyed?

When you release an object in Objective-C (assuming its release count is 1) its release count is decremented to 0 and the dealloc method called. Is the object destroyed right there and then after the [super dealloc], or is it added to the pool and destroyed when the pool is drained? I would assume that released objects are destroyed at ...

Python process pool and scope

I am trying to run autogenerated code (which might potentially not terminate) in a loop, for genetic programming. I'm trying to use multiprocessing pool for this, since I don't want the big performance overhead of creating a new process each time, and I can terminate the pool process if it runs too long (which i cant do with threads). E...

website intermittently available - application pool 1.1 and 2.0 issue

I was having a problem with my .NET 1.1 website which was hard to track down. The default page would show up but when the user entered credentials, it would just be as if nothing happened and the default page would be re-loaded again, without any error messages (although the code behind is trapping errors and also my Global.asax is catch...

java.lang.IllegalMonitorStateException: (m=null) Failed to get monitor for

Why may this happen? The thing is that monitor object is not null for sure, but still we get this exception quite often: java.lang.IllegalMonitorStateException: (m=null) Failed to get monitor for (tIdx=60) at java.lang.Object.wait(Object.java:474) at ... The code that provokes this is a simple pool solution: publi...

Avoid creating 'new' String objects when converting a byte[] to String using a specific charset

I'm reading from a binary file and want to convert the bytes to US ASCII strings. Is there any way to do this without calling new on String to avoid multiple semantically equal String objects being created in the normal object pool? I'm thinking that it is probably not possible since introducing String objects using double quotes is not ...

How to designate a thread pool for actors

I have an existing java/scala application using a global thread pool. I would like to start using actors in the project but would like everything in the app using the same pool. I know I can set the maximum number of threads that actors use but would prefer sharing the thread pool. Is this necessary/reasonable, and is it possible to de...

Unclosed connection - Connection Pool debugging SQL Server

We have a suspect application leaving a connection open. Just wondering on the debugging tools for this, as to whether anyone has any good tools for isolating this, commercial or otherwise. I've Googled but only seem to bring up articles that describe the problem - not the steps for a solution. This is the best article I've seen so f...

Most efficient way to use HttpListener to serve requests in a multithreaded fashion

Scenario: I have 50 (or more) processes running (myproc.exe) that do some business logic. I want to have a web server that takes simple GET's (/foo.html) and just pass this information (the location of GET) one of the running myproc.exe myproc.exe's and this exe (the webserver) have named pipes between them (so 50 named pipes) that pas...

Python Package For Multi-Threaded Spider w/ Proxy Support?

Instead of just using urllib does anyone know of the most efficient package for fast, multithreaded downloading of URLs that can operate through http proxies? I know of a few such as Twisted, Scrapy, libcurl etc. but I don't know enough about them to make a decision or even if they can use proxies.. Anyone know of the best one for my pur...

How to combine Pool.map with Array (shared memory) in Python multiprocessing?

I have a very large (read only) array of data that I want to be processed by multiple processes in parallel. I like the Pool.map function and would like to use it to calculate functions on that data in parallel. I saw that one can use the Value or Array class to use shared memory data between processes. But when I try to use this I get...

Multiprocessing Pool inside Process time out

When ever I use the following code the pool result always returns a timeout, is there something logically incorrect I am doing? from multiprocessing import Pool, Process, cpu_count def add(num): return num+1 def add_wrap(num): new_num = ppool.apply_async(add, [num]) print new_num.get(timeout=3) ppool = Pool(processes=cpu_count(...

app pool settings kill threads but keep settings

.net 2.0 aspx app / IIS6 creating a silly number of threads in w3wp.exe process app pool. The app has been isolated to its own app pool with the following settings: RECYCLING recycle worker processses (in minutes) : 870 recycle worker process (no of requests): (not ticked) recycle worker processes at the following times: 00:00 max vi...

Can't pickle <type 'instancemethod'> when using python's multiprocessing Pool.map()

Hi, I'm trying to use multiprocessing's Pool.map() function to divide out work simultaneously. When I use the following code, it works fine: import multiprocessing def f(x): return x*x def go(): pool = multiprocessing.Pool(processes=4) #result = pool.apply_async(self.f, [10]) #print result.get(timeou...

map of boost pools?

Basically im giving a very weak shot at trying to centralize memory management. Anyways, boost::pool uses chunks of certain sizes. My orignal idea, was to overload new and delete, pass the size into a singleton which would go to the corresponding boost pool and alloc from there. std::map<size_t, boost::pool<> > m_MemPools; Anyways it...

How to pre-calculate the trajectories in a billiard (pool) game?

Hi; Most collision detection algorithm in billiard uses a naive approch, where the balls' positions are incremented and then checked for collisions. This method dosen't work well when the speed are really high because we might "skip" collisions. I have been searching for a way to pre-calculate the trajectories of the balls in a billiar...