# Running ScyllaDB and Spark on the same node, (like Cassandra + Spark)

**URL:** <https://forum.scylladb.com/t/running-scylladb-and-spark-on-the-same-node-like-cassandra-spark/1811>\
**Category:** ScyllaDB\
**Tags:** cassandra, performance, operator, spark\
**Created:** [April 25, 2024, 9:17am UTC](https://forum.scylladb.com/t/running-scylladb-and-spark-on-the-same-node-like-cassandra-spark/1811 "2024-04-25T09:17:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Guy](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.scylladb.com/guy/32/9_2.png) [@Guy](https://forum.scylladb.com/u/Guy)\
**Post date:** [April 25, 2024, 9:17am UTC](https://forum.scylladb.com/t/running-scylladb-and-spark-on-the-same-node-like-cassandra-spark/1811/1 "2024-04-25T09:17:29Z")

</div>

> [@](#):
>
> [**Originally from the User Slack**](https://scylladb-users.slack.com/)
> 
> **@Dharun:** Hi, is it okay to run scylladb with spark on the same node like how datastax has (Cassandra + spark) ?  
> If yes, will it impact any performance ?  
> @Felipe\_Cardeneti\_Mendes
> 
> ![Felipe_Cardeneti_Mendes](https://us1.discourse-cdn.com/flex016/uploads/scylladb/original/1X/233a9d524fbc97e39f08633c16b3dd2575d1d1f4.jpeg) **@Felipe\_Cardeneti\_Mendes:** tldr; it is possible, as long as you tune both services properly. The easiest thing to do is to simply run them separated.
> 
> Long answer:  
> Similarly as it happens with Cassandra, the main reason NOT to run both colocated into the same machine is to avoid Spark from consuming DB resources. With ScyllaDB, you want to ensure that your spark workers are pinned to CPUs not in use by the database to avoid performance problems.
> 
> **@Dharun:** is there any documentation for tuning,  
> we have dse setup, just thinking for similar setup with open source spark & scylladb
> 
> ![Felipe_Cardeneti_Mendes](https://us1.discourse-cdn.com/flex016/uploads/scylladb/original/1X/233a9d524fbc97e39f08633c16b3dd2575d1d1f4.jpeg) **@Felipe\_Cardeneti\_Mendes:** [https://opensource.docs.scylladb.com/stable/getting-started/scylla-in-a-shared-environment.html](https://opensource.docs.scylladb.com/stable/getting-started/scylla-in-a-shared-environment.html)
> 
> > ScyllaDB in a Shared Environment | ScyllaDB Docs
> 
> this is ScyllaDB specific tuning. Check Spark documentation on how to pin them to specific cores
> 
> **@Dharun:** @Felipe\_Cardeneti\_Mendes  
> I see the following is mentioned
> 
> ```auto
> On Red Hat / CentOS, open a terminal and edit /etc/sysconfig/scylla-server, and add --memory 2G to restrict Scylla to 2 gigabytes of RAM.
> 
> ```
> 
> but under /etc/sysconfig/scylla-server where do i set the args ?  
> `SCYLLA_ARGS` ?
> 
> ![Felipe_Cardeneti_Mendes](https://us1.discourse-cdn.com/flex016/uploads/scylladb/original/1X/233a9d524fbc97e39f08633c16b3dd2575d1d1f4.jpeg) **@Felipe\_Cardeneti\_Mendes:** or you can run `scylla_memory_setup`
