Questions tagged [contention]

Questions about any type of resource contention. Use in conjunction with the applicable tag such as [file-access], [memory] or [locking] to indicate the type of resource being referred to.

Questions about any type of resource contention. Use in conjunction with the applicable tag such as , or to indicate the kind of resource being referred to.

88 questions
3
votes
1 answer

futex-based 4-byte single-writer/multiple-readers lock

Looking for a minimal, futex-based implementation of a single-writer/multiple-readers lock requiring no space overhead beyond a single 4-byte futex state variable. Some background: I have an application which will embed a lock within each of tens to…
John Yates
  • 1,027
  • 1
  • 7
  • 18
3
votes
2 answers

Measure contention in wait-free multi-threaded java programs

I have a wait-free implementation for binary search trees but I am not able to figure out concrete methods to measure thread contention. By contention, here I mean number of threads that try to access the same piece of memory at the same time. So…
3
votes
6 answers

Where to look for synchronized contention evidence in java?

Our Tomcat web application feels slow when it is used by a couple hundred users. The servers are in a hosting company and their reports doesn't show any problem with bandwith or cpu workload, so I suspect that the reason of the slowdowns can be…
Serxipc
  • 6,639
  • 9
  • 40
  • 51
2
votes
3 answers

Will refactored methods in a Java-Struts web application cause contention?

I'm working with a company that produces a web application using struts with Java. I have been refactoring a lot of the code recently to tidy up the system. One technique I've been using is to move closing statements for streams, in finally…
Alexei Blue
  • 1,762
  • 3
  • 21
  • 36
2
votes
0 answers

How to ignore long-running signal waits when analyzing contention using Visual Studio profiler?

I tried profiling an application to see potential thread contention issues using the Visual Studio profiler, but the problem is that the profiler sees waits on signals as the worst offenders (because the consuming thread is waiting for the signal…
Lou
  • 4,244
  • 3
  • 33
  • 72
2
votes
2 answers

Reliable, low-contention strategy for incrementing a counter column on insert and update

I've got a remedial question regarding sequences. I've used them a bit and consulted the docs, and am hoping that this is an easy question for the group. We're on Postgres 11.4 now, and will move to PG 12 whenever it's available on RDS. The goal is…
Morris de Oryx
  • 1,857
  • 10
  • 28
2
votes
1 answer

How to find out contention problems in java when most of the classes are concurrent

We used yourkit profiler to find out and resolve many contention issues in our application. We used thread monitoring to see which threads are blocked and resolved many of those issues. But yourkit does not show up ReentrantLocks as blocked or…
anony
  • 314
  • 2
  • 14
2
votes
0 answers

Suggestions for improving lock contention when accessing dictionary

This is my first post so please bear with me if I've missed any guidelines. I'm implementing a solution for throttling keys on the fly, and it revolves around a dictionary that has to be locked before every request (as multiple threads can ask for…
ArvN
  • 21
  • 3
2
votes
0 answers

TypeDescriptor.GetProperties() always returns the same PropertyDescriptorCollection reference. Causing parallel processing problems

Preface: I'm working on moving a library over to process data in parallel, and there is 85%+ contention between threads on PropertyDescriptor.GetValue(), making the parallel processing on multiple cores the same and sometimes worse than processing…
2
votes
4 answers

In Java what happens if two classes call a method in a third class at the same moment?

In my project I have a game class which is called by a client class. At the moment the game class writes a path to a file and the client class will read from this file and clear the contents. I am getting too many conflicts with access here so want…
mhollander38
  • 775
  • 3
  • 11
  • 22
2
votes
1 answer

Sustainable Query Per Seconds [QPS] without incurring in timeout errors

Do you know which is the safest Queries Per Second rate in update on a single entity without incurring in write contention? Reading this document about sharding it clearly says: it is important to note that you can only expect to update any…
systempuntoout
  • 71,966
  • 47
  • 171
  • 241
2
votes
1 answer

Why volatile read always uncontended?

Quote from book java concurrency in practice: The performance cost of synchronization comes from several sources. The visibility guarantees provided by synchronized and volatile may entail using special instructions called memory barriers that…
gstackoverflow
  • 36,709
  • 117
  • 359
  • 710
2
votes
1 answer

lock contention in memory allocation - multi-threaded vs. multi-process

We have developed a big C++ application that is running satisfactorily at several sites on big Linux and Solaris boxes (up to 160 CPU cores or even more). It's a heavily multi-threaded (1000+ threads), single-process architecture, consuming huge…
2
votes
2 answers

Unindexed Foreign Key leads to TM Enqueue Contention

So we've been told that one source of TM Enq contention can be unindexed FK's. My question is which one. I have an INSERT INTO Table_B that is recording TM Enq Wait. It contains a PK that is the parent to other tables and it has columns that are FK…
Mark Brady
2
votes
2 answers

What is causing Thread Contentions with my Azure Queue code?

I just ran the Visual Studio 2010 Thread Profiler against my Azure code and noticed I'm getting a LOT of contentions. My code is blocked more often than it is running! My worker has no custom threading logic in it at all. It is a simple While loop…
Vyrotek
  • 5,356
  • 5
  • 45
  • 70