AcquireMagickMemory and multi thread
Posted: 2013-04-09T01:53:34-07:00
Hello!
I have test app with two threads. Each thread looks like:
I run this app on a 24-core system and expect loading two cores at 100%.
But it doesn't happen. Each of two cores works at 80-90%.
I explored source code and found this call sequence: Image::ping->PingBlob->CloneImageInfo->AcquireImageInfo->AcquireMagickMemory
There is a special memory manager with blocking (memory_semaphore), so I can't use full power of cores.
Am I right?
Is there any way to have memory manager for each thread?
Or may be other solution?
IM 6.7.6.9
CentOs 6.3
I have test app with two threads. Each thread looks like:
Code: Select all
//reading image from file to buffer
while(true)
{
Blob blob( imageData, size );
image.ping( blob );
}
But it doesn't happen. Each of two cores works at 80-90%.
I explored source code and found this call sequence: Image::ping->PingBlob->CloneImageInfo->AcquireImageInfo->AcquireMagickMemory
There is a special memory manager with blocking (memory_semaphore), so I can't use full power of cores.
Am I right?
Is there any way to have memory manager for each thread?
Or may be other solution?
IM 6.7.6.9
CentOs 6.3