" Currently, parser and the consumer save its state and return the control to the caller, which then figures out that it needs to enter a new partition, and that it doesn't need to skip. We do it twice, after row end, and after row start. All this work could be avoided if the consumer installed by the reader adjusted its state and pushed the fragments on the spot. This patch achieves just that. This results in less CPU overhead. The ka/la reader is left still stopping after row end. Brings a 20% improvement in frag/s for a full scan in perf_fast_forward (Haswell, NVMe): perf_fast_forward -c1 -m1G --run-tests=small-partition-skips: Before: read skip time (s) iterations frags frag/s mad f/s max f/s min f/s avg aio aio (KiB) blocked dropped idx hit idx miss idx blk c hit c miss c blk cpu -> 1 0 0.952372 4 1000000 1050009 755 1050765 1046585 976.0 971 124256 1 0 0 0 0 0 0 0 99.7% After: read skip time (s) iterations frags frag/s mad f/s max f/s min f/s avg aio aio (KiB) blocked dropped idx hit idx miss idx blk c hit c miss c blk cpu -> 1 0 0.790178 4 1000000 1265538 1150 1266687 1263684 975.0 971 124256 2 0 0 0 0 0 0 0 99.6% Tests: unit (dev) " * 'sstable-optimize-partition-scans' of https://github.com/tgrabiec/scylla: sstable: mc: reader: Do not stop parsing across partitions sstables: reader: Move some parser state from sstable_mutation_reader to mp_row_consumer_reader sstables: reader: Simplify _single_partition_read checking sstables: reader: Update stats from on_next_partition() sstables: mutation_fragment_filter: Drop unnecessary calls to _walker.out_of_range() sstables: ka/la: reader make push_ready_fragments() safe to call many times sstables: mc: reader: Move out-of-range check out of push_ready_fragments() sstables: reader: Return void from push_ready_fragments() sstables: reader: Rename on_end_of_stream() to on_out_of_clustering_range() sstables: ka/la: reader: Make sure push_ready_fragments() does not miss to emit partition_end
Scylla
Quick-start
To get the build going quickly, Scylla offers a frozen toolchain which would build and run Scylla using a pre-configured Docker image. Using the frozen toolchain will also isolate all of the installed dependencies in a Docker container. Assuming you have met the toolchain prerequisites, which is running Docker in user mode, building and running is as easy as:
$ ./tools/toolchain/dbuild ./configure.py
$ ./tools/toolchain/dbuild ninja build/release/scylla
$ ./tools/toolchain/dbuild ./build/release/scylla --developer-mode 1
Please see HACKING.md for detailed information on building and developing Scylla.
Note: GCC >= 8.1.1 is required to compile Scylla.
Running Scylla
- Run Scylla
./build/release/scylla
- run Scylla with one CPU and ./tmp as data directory
./build/release/scylla --datadir tmp --commitlog-directory tmp --smp 1
- For more run options:
./build/release/scylla --help
Building Fedora RPM
As a pre-requisite, you need to install Mock on your machine:
# Install mock:
sudo yum install mock
# Add user to the "mock" group:
usermod -a -G mock $USER && newgrp mock
Then, to build an RPM, run:
./dist/redhat/build_rpm.sh
The built RPM is stored in /var/lib/mock/<configuration>/result directory.
For example, on Fedora 21 mock reports the following:
INFO: Done(scylla-server-0.00-1.fc21.src.rpm) Config(default) 20 minutes 7 seconds
INFO: Results and/or logs in: /var/lib/mock/fedora-21-x86_64/result
Building Fedora-based Docker image
Build a Docker image with:
cd dist/docker
docker build -t <image-name> .
Run the image with:
docker run -p $(hostname -i):9042:9042 -i -t <image name>