Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asymmetric degrees of concurrency overlap #66

Open
jty2 opened this issue Sep 30, 2021 · 2 comments
Open

Asymmetric degrees of concurrency overlap #66

jty2 opened this issue Sep 30, 2021 · 2 comments

Comments

@jty2
Copy link
Contributor

jty2 commented Sep 30, 2021

I have been measuring the amount of thread concurrency overlap and have found, at times, there is only ~50% of cycles where all specified threads are concurrently still trying to do enough lock_acquire() iterations. The typical behavior is that one thread will somehow finish much earlier than the others, and when it does, the rest of the threads see less contention and therefore achieve higher locking rate. However, only the average rate is reported by lockhammer, resulting in a misleadingly high-performance metric.

Instead of each thread attempting to lock for a specified number of iterations and returning the amount of time that has elapsed, each thread should continuously attempt locking for a fixed amount of time AND return the amount of time that has actually elapsed AND return the number of lock acquires. (For example, each thread is told to "attempt spamming locks for 1000000 timer clock ticks starting at global clock tick value 0x123deadbeef." and they return the start/stop timer ticks and the number of lock acquires.) This should ensure a higher percentage of all-thread concurrency during the measurement and with the added benefit of a bounded execution time.

@rpgolshan
Copy link
Contributor

I think this is a great idea. Having the runtime go for a set amount of time instead of a set number of locks gives a clear idea about the amount of contention a test will produce. I do wonder what kind of performance effect we will see with this.

Does anyone else have input they would like to add about this idea?

@jty2
Copy link
Contributor Author

jty2 commented Oct 7, 2021

Here is an implementation. Instead of -a num_acquires use -O num_clock_ticks. It should be possible to go even further and specify a wall-clock seconds duration.

jty2@d89628b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants