LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Closed Thread
  Search this Thread
Old 05-20-2013, 05:32 AM   #1
rarrao
LQ Newbie
 
Registered: May 2013
Posts: 8

Rep: Reputation: Disabled
Performance issues in Linux Multi-heap Multi-thread application


We are porting a multi-process application to multi-threaded architecture. We have the same application running on Windows and it is very performant.

For Linux we are using the pthread libraries. In order to avoid memory contention we have custom heaps, each thread having its own heap. We are using mspace for this custom heap implemention. However the issue is that this approach is causing a lot of performance overhead. The mspace memory allocations are very slow as compared to the native malloc. This is the bottleneck. We tried the Hoard allocator but that is much worse.

The performance impact is due to:
1. CPU switching: I see more switching in the LWP than in normal multi-processes
2. Memory allocations: I see mspace taking about 7 to 8 times more time than normal malloc

Is there any alternative to acheive multi-heap which is also performant in Linux?
 
Old 05-21-2013, 12:46 AM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
I recommend asking the Mods via the Report button to move this to the Programming Forum.
 
Old 05-21-2013, 02:25 AM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,331
Blog Entries: 55

Rep: Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529
Please post your thread once and in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread should be closed because it is a duplicate of http://www.linuxquestions.org/questi...on-4175462803/.
 
  


Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Multi-customer, multi-tenancy linux box user authentication LinuxGreen Linux - Server 2 04-27-2012 11:34 PM
[SOLVED] what's the difference between a multi-cpu , multi-core and a multi-thread system ? entz Linux - Hardware 11 12-20-2011 05:49 PM
LXer: Linux powers multi-protocol, multi-frequency wireless switch LXer Syndicated Linux News 0 11-03-2006 10:54 AM
global integer in the multi-thread application lordofring Programming 1 08-23-2005 10:36 PM
multi-thread VS multi-process ltcstyle Programming 3 12-04-2004 07:53 PM


All times are GMT -5. The time now is 08:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration