Hello! We're starting a POC for a project in whic...
# questions-and-troubleshooting
d
Hello! We're starting a POC for a project in which we will need to query a 200+ TB dataset with billions of records. We stood up a shared-data starrocks cluster backed by GCS and I just started loading data into our table using a data pipe loading parquet files. I've loaded 437 million records so far (about 600GB) and am running into slightly concerning query performance. I understand that with such a large dataset we're not necessarily going to be able to achieve super fast query speeds, but even querying in such a way that hits
key
and
partition
columns takes up to 10 minutes. I expected to see better performance when including these columns in the
where
clause. I was hoping to talk to someone who has experience working with Starrocks in this type of scenario, perhaps help troubleshooting where we could improve performance, or maybe point me in the direction of some guidelines regarding cluster scaling for this size of dataset. Thanks for any help you can provide - I'm happy to share any details if anyone wants more information
🆒 1
j
Cool, looking forward to read how your POC. We started with just about 10% of your workload Here also another potential user, I guess it would be good for the team to know : • The use case (is it for reporting, ad hoc querying,etc) • your exact setup ( FE/CN with specs ( GPU/ RAM) • The type of table you are using (maybe if possible your CREATE TABLE STATEMENT) • Are you going to use Materialized Views (MV) I believe this is where we expect to see that boost when using native format with primary key tables as sources
d
Nice! Could you also give me an idea of the same for you? It would be good to understand even if vaguely, the results you're seeing and how you got there! • So this project is mainly to support scheduled reports for clients. Usually running hourly, so at peak I would expect hundreds of queries per hour. • For cluster specs (I'm not actually the infrastructure guy): ◦ FE: 5 nodes with 1CPU,4GB RAM each ◦ CN: 5 nodes with 10CPU,54GB RAM each ▪︎ load_process_max_memory_hard_limit_ratio: "1.2" ▪︎ load_process_max_memory_limit_percent: "80" ▪︎ mem_limit: "48G" • I've tried duplicate key and primary key tables and saw similar performance in both. Attaching the create table statement. • We're definitely going to be looking at materialized views moving forward and have not tested them for our use-case yet. The current plan is to create a materialized view per client to make it super fast to query on the reporting side. At that point I suppose it's just a question of how long it takes to refresh the MV...
We're not sure of the expectations on query performance for large datasets like this. If the recommendation is to build MV's, that could work fine, we just want to make sure we're doing everything we can to tune performance on the raw table as well, as we load data in I'm sure it's easier to make changes before we get to the 100+ TB realm 🙂
j
Yes, MV are the ones that we see can assist a lot https://docs.starrocks.io/docs/using_starrocks/async_mv/Materialized_view/ Our use case is adhoc reporting for OLAP purposes so our structure of tables follow a star schema hence we also add some common pre aggregations into the MV so when it's queried the metrics that are are additive /semi additive can be used. Check the EXPLAIN PLAN for your query, that gives an idea on where the issue might be happening We had 2 FE with 2/6Gi and I believe 2 pods with CNS with 30 CPU and 290Gi for that..
The prometheus metrics are also helpful to understand what's happening and also we check the GCS Ops Suite metrics for the bucket to understand the read/writes
d
"datacache.enable" = "false",
why did you turn off the cache, in this case every sql has to read data from S3, so it will not be fast, most of our users turn this on, this is very important for good performance
👍 1
and with this kind of dataset 200TB, ◦ FE: 5 nodes with 1CPU,4GB RAM each ◦ CN: 5 nodes with 10CPU,54GB RAM each this is far from enough, i would recommand change to: FE: 3 nodes with 8 CPU, 16GB CN: 6 nodes with 32CPU, 64GB, 1TB disk you can try this first, maybe needs more CN later since you will be querying 200TB data, but you can start with 6 CN