Details
-
Task
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
None
Description
It is not clear from this document:
https://mariadb.com/docs/reference/mdb/cli/mariadbd/spider-casual-read/
and KB:
https://mariadb.com/kb/en/spider-server-system-variables/#spider_casual_read
what is the "connection channel" and what settings should be used and at what level for typical use cases:
1. The overall data node is 4 nodes and there are two partitions that point to the same data node.
—
CREATE TABLE spider (
:
) ENGINE SPIDER PARTITION BY xxx (
pt1 ... ENGINE SPIDER COMMENT 'srv datanode1' ,
pt2 ... ENGINE SPIDER COMMENT 'srv datanode1' ,
pt3 ... ENGINE SPIDER COMMENT 'srv datanode2' ,
pt4 ... ENGINE SPIDER COMMENT 'srv datanode3' ,
ptmax ... ENGINE SPIDER COMMENT 'srv datanode4'
)
—
2. Case with four overall data nodes and three partitions pointing to the same data node
—
CREATE TABLE spider (
:
) ENGINE SPIDER PARTITION BY xxx (
pt1 ... ENGINE SPIDER COMMENT 'srv datanode1' ,
pt2 ... ENGINE SPIDER COMMENT 'srv datanode1' ,
pt3 ... ENGINE SPIDER COMMENT 'srv datanode1' ,
pt4 ... ENGINE SPIDER COMMENT 'srv datanode2' ,
pt5 ... ENGINE SPIDER COMMENT 'srv datanode3' ,
ptmax ... ENGINE SPIDER COMMENT 'srv datanode4'
)
—
3. Case where the overall data node is 4 nodes and every partition points to a different data node
—
CREATE TABLE spider (
:
) ENGINE SPIDER PARTITION BY xxx (
pt1 ... ENGINE SPIDER COMMENT 'srv datanode1',
pt2 ... ENGINE SPIDER COMMENT 'srv datanode2',
pt3 ... ENGINE SPIDER COMMENT 'srv datanode3',
pt4 ... ENGINE SPIDER COMMENT 'srv datanode4'
)
—
4. Case where all partitions point to a local table
—
CREATE TABLE spider (
:
) ENGINE SPIDER PARTITION BY xxx (
pt1 ... ENGINE InnoDB,
pt2 ... ENGINE InnoDB,
pt3 ... ENGINE InnoDB,
pt4 ... ENGINE InnoDB
)
So, can you, please, clarify in the documentation, Enterprise or KB, or both, what value to set for spider_casual_read, and on what level, table or global, for each of these 4 cases?
Attachments
Issue Links
- includes
-
MDEV-31787 Clean up and code documentation of casual_read related code
-
- Closed
-
- relates to
-
MDEV-31788 Factor out code repeat in functions calling spider_check_and_init_casual_read()
-
- Closed
-
-
MDEV-31789 Deprecate spider_casual_read
-
- Closed
-
- blocks
-
DOCS-2909 Loading...
- is duplicated by
-
DOCSCOLLAB-170 Loading...
- is parent of
-
DOCSCOLLAB-682 Loading...
The word "a connection channel" refers to a database connection to a data node (the Spider SE may have multiple channels to a single data node). With more partitions on a Spider table, you would have more chances to leverage parallelism. As the documentation said, this is true even if multiple shards are stored on the same physical server. Please note that it quite depends on how much the response time is reduced by parallel search, so it is best to have the actual measurement done in the user's environment.
Setting spider_casual_read=X (X in [2, 3..., 63]) is to let the Spider storage engine use the specific channel of No. X to each data node. This setting seems to be for fine-tuning and sometimes results in an excessive tweak. So, if one wants to benefit from a parallel read, I recommend setting spider_casual_read = 1 in most cases.