-
Notifications
You must be signed in to change notification settings - Fork 463
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
JAMES-3435 Cassandra: No longer rely on LWT for domain and users #255
Conversation
I'm not sure to get the value of this change. Managing domain and users is not a very recurring operation, so why do you expect some performance improvement by relaxing these constraints? |
Reading them is. And SERIAL consistency is required in such cases, implying a read of paxos system table. That's why I do you expect some performance improvement by relaxing these constraints. That being said, it looks like SERIAL consistency level was not even specified there (!!!) giving a false feeling of safety (we likely had untested concurrency issues with this validation behavior). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do you know you are not overwriting an existing domain? From a user point of view there's no such thing as upsert comment, only create/update right?
assertThatThrownBy(() -> domainList().addDomain(DOMAIN_UPPER_5)) | ||
.isInstanceOf(DomainListException.class); | ||
|
||
assertThat(domainList().getDomains().stream().filter(domain -> domain.equals(DOMAIN_5) || domain.equals(DOMAIN_UPPER_5))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you don't know which domain to expect?
WebAdmin, the de-facto API for creating users, domains only exposes an UPSERT. Why ask this question at the data layer and not at the presentation layer? |
For one of our upcoming deployments, we are performing a load-testing campaign against a testing infrastructure. This load testing campaign aims at finding the limits of the aforementioned platform. We successfully succeeded to load James JMAP endpoint to a break-point at 5400 users (isolation). Above that number, evidence suggest that we are CPU bound (requests ) On a Cassandra standpoints, there is a high CPU usage (load of 10) that we linked to the usage of lightweight transactions / paxos usage, for ACLs [1] [2] [3] [4]. Detailed analysis is on the references. This is a topic I'm arguing for months [5], we need to take a strong decision, and enforce it. Infrastructure:
Action to conduct
Runs details[6] [7] shows a (successfull!) run of JMAP scenario alone on top of James. [8] [9] shows a run hitting a throughtput limit point (5400 simultaneous users, 320 req/s) from which the performance highly downgrades. This is the system breaking point. References[1] https://blog.pythian.com/lightweight-transactions-cassandra/ documents the CPU / memory / bandwith impact of using LWT. [2] dstat-cassandra.txt highlights a CPU over-usage on Cassandra node. This behavior is NOT NORMAL. Read-heavy workload are not supposed to be CPU-bound. [3] cassandra-tablestats.txt shouws table usage. We can notice BY FAR that our most used table is the system.paxos table. [4] compaction-history.txt highlights how often we do compact the paxos system table in comparison to other tables further higlighting this to be a hot-spot. [5] Benoit proposition to review lightweight transaction / paxos usage in James: #255 [6] 4000-stats.png shows good statistics of a run with 4000 users |
LWT are only done on modifications which are rare for users and domains. Let's close this for now. |
No description provided.