increase the max allowed number of clusters per database
OrientDB Version, operating system, or hardware.
- v2.2.7
Operating System
- [x] Linux
Expected behavior and actual behavior
Currently, the documentation (http://orientdb.com/docs/2.1/Administration.html) describes that a database can have a maximum of 32767 clusters.
We intend to tightly control which clusters are replicated and on which servers, so for each class we are going to create the clusters ourselves with a strict naming convention, which is then reflected by the contents in the distributed config file "distributed-db-config.json"
This results in creating 6 clusters per date of the records of each class. For a full year worth, this yields into 366*6=2196 clusters for a single class. With that maximum of 32767 (2^15-1, clearly stored in a 16-bit word) clusters per database, that would allow only about 14 classes in the database.
-> can this max allowed number of clusters per database be increased to -say- the max value of a 32-bit word (2^31-1 = 2147M clusters) ?
Also a requirement when proceeding with the strategy described in previous topic #6497 : date/time based clusters per class, for easy DROP CLUSTER based removal of old data without creating 'gaps' in the class data blocks.
We already have an issue for this enhancement. Once this limit is extended to 31 bits, the next problem is managing so many opened files. Most OS have limitation with it.
Ubuntu can raise the limits of open files per process, dunnow where the limit is but that's outside this topic. @lvca What is the other issue where this same enhancement has been requested (to extend to 31bits), please?
Look at: https://github.com/orientechnologies/orientdb/issues/1930
@lvca ok, I guess this one can be closed then. Thanks for your feedbacks!
@lvca Re "We already have an issue for this enhancement. Once this limit is extended to 31 bits, the next problem is managing so many opened files. Most OS have limitation with it." -> has this limit already been extended meanwhile ? What are the current (eg version 2.2.17) limits for number of classes and numbers of clusters?
can anyone please confirm if this issue has been implemented (ie raise of max number of clusters)?
Hi @rdelangh
The limit with open files was fixed in 2.2, but the raise of max number of cluster was not. Please wait for the storage team for comments
Thanks
Luigi
Hi no. Limit of number open clusters was not extended yet.
The main reason is that we found that with thousands of clusters = files and the OS could have an hard time to manage all of them, even with custom configuration. So we put this on hold for a while.
The reason for us is that we have a real big database. Storing all the data in few classes (because we are limited on the number of clusters used by these classes), is not recommended:
- corruption of one class means a loss of very much data
- fixing a class, or one of its indexes, means very long timeframe and high impact on the rest of the usage of that class
- the indexes are (currently?) stored in a single file; an index of very much data will result in a huge (> 100GB) size file, which will never fit somewhere in RAM
So we have to spread the data over several classes, currently we use a class per week of data. This way we would immediately hit that maximum number of possible clusters. So we also pre-create clusters for each class, 6 clusters per class. But still then, we need to limit seriously the number of classes for different sorts of data.
-> a raise of the number of possible clusters would be essential to keep data in enough separate classes
In your case you should use 1 cluster per class, so you can handle up to 32K weeks = 615 years.
@lvca no, because then we cannot distribute the data of one class over different servers.
@rdelangh so are you using sharding?
@lvca our config file "default-distributed-db-config.json" contains this:
{
"autoDeploy": true,
"readQuorum": 1,
"writeQuorum": "majority",
"executionMode": "undefined",
"readYourWrites": true,
"newNodeStrategy": "static",
"servers": {
"*": "master"
},
"clusters": {
"internal": {
},
"cl_*_p0": { "servers": [ "orient1", "orient2", "orient4" ] },
"cl_*_p1": { "servers": [ "orient2", "orient3", "orient5" ] },
"cl_*_p2": { "servers": [ "orient3", "orient4", "orient6" ] },
"cl_*_p3": { "servers": [ "orient4", "orient5", "orient1" ] },
"cl_*_p4": { "servers": [ "orient5", "orient6", "orient2" ] },
"cl_*_p5": { "servers": [ "orient6", "orient1", "orient3" ] },
"*": {
"servers": ["orient1"]
}
}
}
can anyone please confirm if this issue has been implemented (ie raise of max number of clusters)?