-
Notifications
You must be signed in to change notification settings - Fork 3k
[RFE] use binary instead of atom for lcnt lock name #9388
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
Conversation
CT Test Results 4 files 152 suites 51m 59s ⏱️ Results for commit 2dc1a68. ♻️ This comment has been updated with latest results. To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass. See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally. Artifacts// Erlang/OTP Github Action Bot |
|
I will look into making it possible to simplifying the socket mutex names (from "esock.r[10]" to just esock.r"). |
|
can we add an id field to ErlDrvMutex_ and make MCREATE support 2 args? in that way we don't need to do |
|
If you’re referring to |
|
One option could be to have |
That still leaks a difference between small and big integers. 😕 |
|
I guess if the argument is limited to a |
Do you mean you will do some other changes or just remove the SOCKET_FORMAT_STR on mutex creation? I can do that |
|
The solution I have now is that the "format" of the mutex name can be configured. |
|
I'm closing this PR as @bmk will fix the underlying issue. |
We met an issue when using lcnt on a node with millions of active sockets. It has to create 2 atoms like 'esock.r[xxxxx]' for every socket, so that the lcnt is locking itself on the atom table.
This change makes the lcnt use binaries instead of atom as lock name to avoid this issue.
However, this change slows down the lcnt result processing and also makes it use a lot more memory. Just raising this PR for discussion.