# Multi Tenancy in SingleStore Cluster

**URL:** <https://www.singlestore.com/forum/t/multi-tenancy-in-singlestore-cluster/3086>\
**Category:** Workload Profiling\
**Created:** [June 24, 2021, 4:50pm UTC](https://www.singlestore.com/forum/t/multi-tenancy-in-singlestore-cluster/3086 "2021-06-24T16:50:48Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![japillai.c](https://www.singlestore.com/forum/letter_avatar_proxy/v4/letter/j/2acd7d/32.png) [@japillai.c](https://www.singlestore.com/forum/u/japillai.c)\
**Post date:** [June 24, 2021, 4:50pm UTC](https://www.singlestore.com/forum/t/multi-tenancy-in-singlestore-cluster/3086/1 "2021-06-24T16:50:48Z")

</div>

I have a single store cluster with two databases running in it Eg DB1 ,DB2 . Using Resource governor I have set the properties of resource allocation at cluster level .

Is there a way by which I can increase the size , compute resourcing of just the DB2 database and not DB1. ?

---

<div class="post-metadata">

**Author:** ![hanson](https://www.singlestore.com/forum/user_avatar/www.singlestore.com/hanson/32/196_2.png) [@hanson](https://www.singlestore.com/forum/u/hanson)\
**Post date:** [June 24, 2021, 10:58pm UTC](https://www.singlestore.com/forum/t/multi-tenancy-in-singlestore-cluster/3086/2 "2021-06-24T22:58:26Z")

</div>

With resource governor, you could direct queries to each database into different resource pools, thus giving more resources to one of them.

Why do you want to do this?

---

<div class="post-metadata">

**Author:** ![japillai.c](https://www.singlestore.com/forum/letter_avatar_proxy/v4/letter/j/2acd7d/32.png) [@japillai.c](https://www.singlestore.com/forum/u/japillai.c)\
**Post date:** [June 25, 2021, 5:38am UTC](https://www.singlestore.com/forum/t/multi-tenancy-in-singlestore-cluster/3086/3 "2021-06-25T05:38:11Z")

</div>

I shall explain with the same example . Suppose a large organization wants to keep it 2 app DBs ( DB1 and DB2 ) in the same cluster . Over a period of time the organization realizes that the DB2 requires more compute power and storage . In order to add extra resources a budget needs to be allocated by the IT department handling DB2 .

Q1 . How can the sizing be done so that all new resources allocated be assigned to DB2 only , not DB1 ?

Q2. How can the new resources added be alloacted to just DB2 ?

Q3 . Is there a way we can identify the consumed resources by either DBs?

---

<div class="post-metadata">

**Author:** ![hanson](https://www.singlestore.com/forum/user_avatar/www.singlestore.com/hanson/32/196_2.png) [@hanson](https://www.singlestore.com/forum/u/hanson)\
**Post date:** [June 25, 2021, 10:24pm UTC](https://www.singlestore.com/forum/t/multi-tenancy-in-singlestore-cluster/3086/4 "2021-06-25T22:24:02Z")

</div>

Thanks for sharing that. Some of our customers have addressed this, at least in part, by creating databases with different numbers of partitions. If you want a database to have access to less CPU resources, you can create it with fewer partitions, since currently we allocate one thread per partition. Since 7.3, we spread databases around the cluster when you rebalance.

---

<div class="post-metadata">

**Author:** ![adam](https://www.singlestore.com/forum/letter_avatar_proxy/v4/letter/a/4af34b/32.png) [@adam](https://www.singlestore.com/forum/u/adam)\
**Post date:** [June 26, 2021, 4:00am UTC](https://www.singlestore.com/forum/t/multi-tenancy-in-singlestore-cluster/3086/5 "2021-06-26T04:00:44Z")

</div>

Eric is referring to the partition count in the create database statement:

> **[CREATE DATABASE · SingleStore Documentation](https://docs.singlestore.com/db/v7.3/reference/sql-reference/data-definition-language-ddl/create-database/)**
>
> SingleStore is a modern relational database for cloud and on-premises that delivers immediate insights for modern applications and analytical systems. Book a demo or trial today!

We have a future feature in the works to help out with this scenario. The ability to split up compute in a cluster into workspaces and attach different databases to different workspaces. We don’t have a precise ETA for this feature yet.

---

<div class="post-metadata">

**Author:** ![japillai.c](https://www.singlestore.com/forum/letter_avatar_proxy/v4/letter/j/2acd7d/32.png) [@japillai.c](https://www.singlestore.com/forum/u/japillai.c)\
**Post date:** [June 27, 2021, 5:58am UTC](https://www.singlestore.com/forum/t/multi-tenancy-in-singlestore-cluster/3086/6 "2021-06-27T05:58:11Z")

</div>

Thanks for the answers .
