Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates to data serving #447

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Enable row cache, change GC to G1, and add debugging parameters
  • Loading branch information
BugraEryilmaz committed May 20, 2024
commit 30fbf7def728e7f18916f92f0a034cc71ddddddb
2 changes: 2 additions & 0 deletions benchmarks/data-serving/client/setup_tables.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ create table if not exists usertable (
field7 varchar,
field8 varchar,
field9 varchar);
ALTER TABLE ycsb.usertable WITH caching = {'keys' : 'ALL', 'rows_per_partition' : '120'};
BugraEryilmaz marked this conversation as resolved.
Show resolved Hide resolved
ALTER TABLE ycsb.usertable WITH default_time_to_live = 1024;
exit;
32 changes: 32 additions & 0 deletions benchmarks/data-serving/server/docker-entrypoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def get_ip():
parser.add_argument("--heap-size", type=int, help="The size of JVM heap in GB. Default is max(min(1/2 ram, 1GB), min(1/4 ram, 8GB)).")
parser.add_argument("--seed-server-ip", help="The IP address of the seed server. This option is only for multiple-node deployment.")
parser.add_argument("--affinity", help="The CPU ids (separated by comma) given to Cassandra to set JVM affinity. By default, Cassandra would use all CPU cores.")
parser.add_argument("--row-cache", help="The size of row cache, example 16GiB. By default, the row cache is disabled.", default="0")
BugraEryilmaz marked this conversation as resolved.
Show resolved Hide resolved


args = parser.parse_args()
Expand Down Expand Up @@ -56,6 +57,8 @@ def get_ip():
config["concurrent_reads"] = args.reader_count
config["concurrent_counter_writes"] = args.reader_count
config["concurrent_writes"] = args.writer_count
config["row_cache_size"] = args.row_cache
config["row_cache_save_period"] = "1h"

if args.seed_server_ip:
config["seed_provider"][0]["parameters"][0]["seeds"] = f"{args.seed_server_ip}:7000"
Expand All @@ -78,11 +81,40 @@ def get_ip():
jvm_options[idx] = ""
if l.startswith("-Xmx"):
jvm_options[idx] = ""
# Disable CMS Garbage Collection
if l.startswith("-XX:+UseConcMarkSweepGC"):
jvm_options[idx] = ""
if l.startswith("-XX:+CMSParallelRemarkEnabled"):
jvm_options[idx] = ""
if l.startswith("-XX:SurvivorRatio"):
jvm_options[idx] = ""
if l.startswith("-XX:MaxTenuringThreshold"):
jvm_options[idx] = ""
if l.startswith("-XX:CMSInitiatingOccupancyFraction"):
jvm_options[idx] = ""
if l.startswith("-XX:+UseCMSInitiatingOccupancyOnly"):
jvm_options[idx] = ""
if l.startswith("-XX:CMSWaitDuration"):
jvm_options[idx] = ""
if l.startswith("-XX:+CMSParallelInitialMarkEnabled"):
jvm_options[idx] = ""
if l.startswith("-XX:+CMSEdenChunksRecordAlways"):
jvm_options[idx] = ""
if l.startswith("-XX:+CMSClassUnloadingEnabled"):
jvm_options[idx] = ""


# Add heap size
jvm_options.append(f"-Xms{args.heap_size}G\n")
jvm_options.append(f"-Xmx{args.heap_size}G\n")

# Add G1 Garbage Collection
jvm_options.append("-XX:+UseG1GC\n")
jvm_options.append("-XX:+ParallelRefProcEnabled\n")

# Add PreserveFramePointer for flamegraph
jvm_options.append("-XX:+PreserveFramePointer\n")

if args.affinity:
found = False
for idx, l in enumerate(jvm_options):
Expand Down