| | |
Problem identification problem :D
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jun 2009
Posts: 22
Reputation:
Solved Threads: 0
Hi,
I was assigned to study and understand some code and I was told the major problem with the program was poor performance.
Here's the bottleneck:
A global data set is maintained. This data set is updated regularly. Then there are threads that have to do some processing using a snapshot of the dataset after each update. The processing threads do not change the dataset but they require that no one else changes the dataset while they are evaluating as well. This means that the dataset cannot be updated (Which in turn means that the processing threads can't process using the updated dataset) while the threads are processing - which is the bottleneck as the update rate for the dataset is high.
I can think of couple of ways of improving the performance, but I feel pretty certain that this is a common problem. I would like to know the name of this problem if this is indeed a common problem. (So I can Google). Or suggestions on how to improve performance.
Currently I thought of two methods:
1. Maintain 2 or more data sets that are identical. Update one data set(A) when the other(B) is used by processing threads. then update B using A with a dedicated thread?
2. Incremental updating of data set? Keep a separate list of updates and the dataset. When updating, add to the list. When processing, use both the list's data and dataset. periodically update dataset with the list. (This is again like the first method)
Thanks
I was assigned to study and understand some code and I was told the major problem with the program was poor performance.
Here's the bottleneck:
A global data set is maintained. This data set is updated regularly. Then there are threads that have to do some processing using a snapshot of the dataset after each update. The processing threads do not change the dataset but they require that no one else changes the dataset while they are evaluating as well. This means that the dataset cannot be updated (Which in turn means that the processing threads can't process using the updated dataset) while the threads are processing - which is the bottleneck as the update rate for the dataset is high.
I can think of couple of ways of improving the performance, but I feel pretty certain that this is a common problem. I would like to know the name of this problem if this is indeed a common problem. (So I can Google). Or suggestions on how to improve performance.
Currently I thought of two methods:
1. Maintain 2 or more data sets that are identical. Update one data set(A) when the other(B) is used by processing threads. then update B using A with a dedicated thread?
2. Incremental updating of data set? Keep a separate list of updates and the dataset. When updating, add to the list. When processing, use both the list's data and dataset. periodically update dataset with the list. (This is again like the first method)
Thanks
•
•
Join Date: Jun 2009
Posts: 22
Reputation:
Solved Threads: 0
Nope. Not looking for mutexes
. What I want is to be able to write to a data set while many threads are reading from it. the reading threads require that the data set remain unchanged during their processing. This is obviously made simple by using mutexes- unfortunately I can't use it because then the performance would suck.
i.e. Update rate is 100 updates/s, 25 threads, 5 processings per sec per thread.
What happens if I lock the data set is that the effective processing rate of the system drops to 5.
Anyone know a name for this mess?
. What I want is to be able to write to a data set while many threads are reading from it. the reading threads require that the data set remain unchanged during their processing. This is obviously made simple by using mutexes- unfortunately I can't use it because then the performance would suck. i.e. Update rate is 100 updates/s, 25 threads, 5 processings per sec per thread.
What happens if I lock the data set is that the effective processing rate of the system drops to 5.
Anyone know a name for this mess?
![]() |
Similar Threads
- One way ping problem (Networking Hardware Configuration)
- Need Help for DNS Problem and 'about:blank' Problem ... (Viruses, Spyware and other Nasties)
- Computer Problem Or Display Problem? (Windows 95 / 98 / Me)
- problem installing linux drivers, help me and ya got my respect!!! (*nix Hardware Configuration)
- windows 2000 Direct3D problem (Windows NT / 2000 / XP)
- Software problem or hardware problem? (Windows NT / 2000 / XP)
- lite on 52327s speed problem, DMA issue? (Storage)
- Problem connecting to the internet (Web Browsers)
- Network Card installation Problem (PCI and Add-In Cards)
- Networked Win2k Printers Problem (Windows NT / 2000 / XP)
Other Threads in the C++ Forum
- Previous Thread: Help with Progress Bars
- Next Thread: link list accessment
Views: 323 | Replies: 4
| Thread Tools | Search this Thread |
Tag cloud for C++
6 api application array arrays based beginner binary bmp c++ c/c++ calculator char char* class classes code compile compiler console conversion convert count data delete deploy dll download dynamiccharacterarray encryption error file format forms fstream function functions game givemetehcodez graph homeworkhelp iamthwee ifstream input int java lib library lines list loop looping loops map math matrix memory newbie news number numbertoword output pointer problem program programming project python random read recursion recursive reference return rpg search simple sort sorting spoonfeeding string strings struct temperature template templates text tree url variable vector video visual visualstudio void win32 windows winsock wordfrequency wxwidgets






