Avi Kivity
2720ba34bf
db: shard data
...
Add database::shard_of() to compute the shard hosting the partition
(with a simplistic algorithm, but perhaps not too bad).
Convert non-metadata invoke_on_all() and local calls on the database
to use shard_of().
2015-02-23 11:37:12 +02:00
Avi Kivity
83430355c2
Merge branch 'master' of github.com:cloudius-systems/seastar into db
...
LICENSE moved to LICENSE.seastar, since (at least for now) urchin is
not open source.
Conflicts:
apps/seastar/main.cc
2015-02-22 16:23:59 +02:00
Avi Kivity
70381a6da5
db: distribute database object
...
s/database/distributed<database>/ everywhere.
Use simple distribution rules: writes are broadcast, reads are local.
This causes tremendous data duplication, but will change soon.
2015-02-19 17:53:13 +02:00
Avi Kivity
7f8d88371a
Add LICENSE, NOTICE, and copyright headers to all source files.
...
The two files imported from the OSv project retain their original licenses.
2015-02-19 16:52:34 +02:00
Avi Kivity
07bb7cceb1
tests: fix mutation_test debug build
2015-02-18 20:09:41 +02:00
Tomasz Grabiec
f943555571
service: Convert client_state constructors
2015-02-16 12:15:08 +01:00
Avi Kivity
39596a0334
Merge branch 'master' of github.com:cloudius-systems/seastar into db
...
Conflicts:
configure.py
2015-02-15 09:58:29 +02:00
Tomasz Grabiec
6a998e2d78
tests: Add test for parsing and execution of CQL3 queries
2015-02-12 19:40:59 +01:00
Avi Kivity
ebc2ebbf12
Upgrade http_client to an application, not a test
...
and rename it to 'seawreck', after wrk.
2015-02-12 14:21:44 +02:00
Asias He
51adb20bda
tests: Add http_client
...
It is based on tcp_client and works with our httpd server.
1) timer based, to run the test for 10 seconds
$ http_client --server 192.168.66.100:10000 --conn 100 --duration 10 --smp 2
========== http_client ============
Server: 192.168.66.100:10000
Connections: 100
Requests/connection: dynamic (timer based)
Requests on cpu 0: 33400
Requests on cpu 1: 33368
Total cpus: 2
Total requests: 66768
Total time: 10.011478
Requests/sec: 6669.145442
========== done ============
2) nr of reqs per connection based, to run the test with 100 connections
each has to run 1000 reqs
$ http_client --server 192.168.66.100:10000 --conn 100 --reqs 1000 --smp 2
========== http_client ============
Server: 192.168.66.100:10000
Connections: 100
Requests/connection: 1000
Requests on cpu 0: 50000
Requests on cpu 1: 50000
Total cpus: 2
Total requests: 100000
Total time: 15.002731
Requests/sec: 6665.453192
========== done ============
This patch is based on Shlomi's initial version.
Signed-off-by: Shlomi Livne <shlomi@cloudius-systems.com >
Signed-off-by: Asias He <asias@cloudius-systems.com >
2015-02-12 10:02:48 +02:00
Avi Kivity
64930bc610
tests: add linecount tests
...
Demonstrates and tests file_input_stream.
2015-02-11 15:38:51 +02:00
Tomasz Grabiec
10e58e0cda
tests: Make test runner catch and forward exceptions thrown directly from task
2015-02-10 14:47:42 +02:00
Tomasz Grabiec
85c67001dd
tests: Add test for exceptions thrown from do_until()
2015-02-10 14:47:42 +02:00
Tomasz Grabiec
fb6941bbee
tests: Add test for row tombstones
2015-02-09 10:28:45 +01:00
Tomasz Grabiec
138ed6faac
tests: Add test for tuple_type::is_prefix_of()
2015-02-09 10:28:45 +01:00
Tomasz Grabiec
543cc40d1a
tests: Add performance test for in-memory row mutation
...
It shows that our serialization code, which is using ostringstream
under the hood, is really dragging us down. In the perf profile we can
see dynamic casts high called from iostream classes, called from
abstract_type::decompose()
$ taskset -c 0 build/release/tests/perf/perf_mutation
Timing mutation of single column within once row
83536.54 tps
115157.06 tps
85059.52 tps
60443.80 tps
112878.47 tps
$ perf report
- 11,66% perf_mutation libstdc++.so.6.0.20 [.] __cxxabiv1::__si_class_type_info::__do_dyncast(long, __cxxabiv1::__class_type_info::__sub_kind, __cxxabiv1:▒
+ __cxxabiv1::__si_class_type_info::__do_dyncast(long, __cxxabiv1::__class_type_info::__sub_kind, __cxxabiv1::__class_type_info const*, void const*, __cxxabiv1::__c◆
- __dynamic_cast ▒
- 43,58% std::num_get<char, std::istreambuf_iterator<char, std::char_traits<char> > > const& std::use_facet<std::num_get<char, std::istreambuf_iterator<char, std▒
std::basic_ios<char, std::char_traits<char> >::_M_cache_locale(std::locale const&) ▒
- std::basic_ios<char, std::char_traits<char> >::init(std::basic_streambuf<char, std::char_traits<char> >*) ▒
92,70% std::basic_istringstream<char, std::char_traits<char>, std::allocator<char> >::basic_istringstream(std::string const&, std::_Ios_Openmode) ▒
+ 7,30% abstract_type::decompose(boost::any const&) ▒
- 27,36% bool std::has_facet<std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > > >(std::locale const&) ▒
std::basic_ios<char, std::char_traits<char> >::_M_cache_locale(std::locale const&) ▒
- std::basic_ios<char, std::char_traits<char> >::init(std::basic_streambuf<char, std::char_traits<char> >*) ▒
93,14% std::basic_istringstream<char, std::char_traits<char>, std::allocator<char> >::basic_istringstream(std::string const&, std::_Ios_Openmode) ▒
+ 6,86% abstract_type::decompose(boost::any const&) ▒
+ 14,54% bool std::has_facet<std::num_get<char, std::istreambuf_iterator<char, std::char_traits<char> > > >(std::locale const&) ▒
+ 14,52% std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > > const& std::use_facet<std::num_put<char, std::ostreambuf_iterator<char, std▒
- 9,97% perf_mutation libstdc++.so.6.0.20 [.] __dynamic_cast ▒
- __dynamic_cast ▒
+ 19,67% std::num_get<char, std::istreambuf_iterator<char, std::char_traits<char> > > const& std::use_facet<std::num_get<char, std::istreambuf_iterator<char, std▒
+ 18,66% std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > > const& std::use_facet<std::num_put<char, std::ostreambuf_iterator<char, std▒
+ 16,72% bool std::has_facet<std::num_get<char, std::istreambuf_iterator<char, std::char_traits<char> > > >(std::locale const&) ▒
+ 15,16% bool std::has_facet<std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > > >(std::locale const&) ▒
+ 15,04% bool std::has_facet<std::ctype<char> >(std::locale const&) ▒
+ 14,74% std::ctype<char> const& std::use_facet<std::ctype<char> >(std::locale const&) ▒
- 7,98% perf_mutation libstdc++.so.6.0.20 [.] __cxxabiv1::__vmi_class_type_info::__do_dyncast(long, __cxxabiv1::__class_type_info::__sub_kind, __cxxabiv1▒
- __cxxabiv1::__vmi_class_type_info::__do_dyncast(long, __cxxabiv1::__class_type_info::__sub_kind, __cxxabiv1::__class_type_info const*, void const*, __cxxabiv1::__▒
- __dynamic_cast ▒
- 77,13% std::ctype<char> const& std::use_facet<std::ctype<char> >(std::locale const&) ▒
std::basic_ios<char, std::char_traits<char> >::_M_cache_locale(std::locale const&) ▒
+ std::basic_ios<char, std::char_traits<char> >::init(std::basic_streambuf<char, std::char_traits<char> >*) ▒
+ 22,87% bool std::has_facet<std::ctype<char> >(std::locale const&) ▒
+ 6,45% perf_mutation libstdc++.so.6.0.20 [.] std::locale::locale() ▒
+ 6,40% perf_mutation libstdc++.so.6.0.20 [.] std::locale::~locale() ▒
+ 5,02% perf_mutation libstdc++.so.6.0.20 [.] std::locale::operator=(std::locale const&) ▒
+ 4,18% perf_mutation libc-2.19.so [.] __GI___strcmp_ssse3 ▒
2015-02-09 10:28:45 +01:00
Tomasz Grabiec
2244eab6c1
db: Steal data from mutations when applying
...
Taking mutations by r-value reference allows us to avoid copies.
2015-02-09 10:28:44 +01:00
Tomasz Grabiec
28915bf673
tests: Add test for applying mutations
2015-02-09 10:28:44 +01:00
Tomasz Grabiec
ee10d9b437
tests: Add test for int32_type string conversions
2015-02-09 10:28:44 +01:00
Tomasz Grabiec
5049ed8ae6
Merge branch 'master' of github.com:cloudius-systems/seastar
2015-01-30 09:34:58 +01:00
Avi Kivity
94e01e6d0e
tests: exit after timertest ends
2015-01-29 12:24:03 +02:00
Avi Kivity
070eb7d496
tests: serialize timer tests
...
Otherwise the output gets interspersed.
2015-01-29 12:20:39 +02:00
Tomasz Grabiec
661bb3d478
tests: Use test_runner to run boost tests
2015-01-29 10:30:14 +02:00
Tomasz Grabiec
a1fecad8cb
tests: Introduce test_runner class
...
It uses app_template to launch seastar framework and can be used from
outside threads to inject tasks.
2015-01-29 10:30:14 +02:00
Tomasz Grabiec
8ad50d6614
core: Add exchanger class
2015-01-29 10:30:13 +02:00
Takuya ASADA
9de86ed651
tests: Support tcp_server tests(ping,txtx,rxrx) on tcp_client
...
Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com >
2015-01-28 16:26:46 +02:00
Avi Kivity
d5540bf3da
Merge branch 'master' into db
2015-01-27 15:09:31 +02:00
Gleb Natapov
7a92efe8d1
core: add local engine accessor function
...
Do not use thread local engine variable directly, but use accessor
instead.
2015-01-27 14:46:49 +02:00
Avi Kivity
0f14fdab68
Merge branch 'master' of github.com:cloudius-systems/seastar into db
2015-01-20 13:03:58 +02:00
Avi Kivity
2e4122ddd7
futures_test: add broken semaphore test
2015-01-20 11:30:56 +02:00
Avi Kivity
555be6f4bc
tests: test aligned allocator
2015-01-19 09:49:32 +02:00
Avi Kivity
4c3eb49aaf
tests: add smp test
...
Test calling a function, and calling a function that returns an exception.
The second test verifies that cross cpu free works.
2015-01-15 15:19:02 +02:00
Avi Kivity
cf8161b532
Merge branch 'master' of github.com:cloudius-systems/seastar into db
2015-01-14 17:02:12 +02:00
Takuya ASADA
e1552ad3b6
core: rename smp.hh to distributed.hh
...
Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com >
2015-01-14 11:16:09 +02:00
Avi Kivity
4c46f4db8c
tests: test literal + sstring concatenation
2015-01-13 10:13:05 +02:00
Avi Kivity
926091ae43
Merge branch 'master' of github.com:cloudius-systems/seastar into db
...
Conflicts:
configure.py
2015-01-12 14:14:03 +02:00
Avi Kivity
0aaea57838
tests: fix missing do in do/while(0) in timertest
...
Thanks clang.
2015-01-08 18:36:51 +02:00
Avi Kivity
c95e452a3a
Merge branch 'directory'
...
Directory listing support, using subscription<sstring> to represent the
stream of file names produced by the directory lister running in parallel
with the directory consumer.
2015-01-08 11:14:52 +02:00
Avi Kivity
4fd5ab936b
tests: add directory_test
...
Lists the current directory, testing open_directory() / list_directory().
2015-01-08 11:09:27 +02:00
Takuya ASADA
46d8b24626
Add tcp_client test
...
Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com >
2015-01-08 01:26:36 +09:00
Nadav Har'El
c07292ed7d
test: test util/serialization.hh
...
Add a test (using the Boost unit-test framework) for the functions of
util/serealization.hh for serializing and de-serializing primitive types
like integers and strings.
The test checks that the round-trip is correct, i.e., taking an original
data, serializing it and de-serializing it back, gets the same data back.
Moreover, it compares the result of serialization to pre-computed expected
results (which were produced by a Java program), to confirm that our code
generates the same serialization as Java.
Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com >
2015-01-07 14:01:03 +02:00
Gleb Natapov
12bce3f4fc
net: make interface get packets from l3
...
Instead of l3 (arp/ipv4) pushing packets into interface's queue, make
them register functions that interface can use to ask l3 for packets.
2015-01-06 15:24:10 +02:00
Avi Kivity
f2e25b8442
Merge branch 'shared_ptr'
...
Split shared_ptr into a traditional polymorphic shared_ptr implementation,
and a lighter-weight, non polymorphic lw_shared_ptr.
2015-01-05 11:29:35 +02:00
Avi Kivity
87f63f7b90
shared_ptr: rename to lw_shared_ptr (for light-weight)
...
The current shared_ptr implementation is efficient, but does not support
polymorphic types.
Rename it in order to make room for a polymorphic shared_ptr.
2015-01-04 22:38:49 +02:00
Shlomi Livne
b7a83903b5
tests: terminate memcached instance with SIGTERM
...
Terminate a running memcached instance with a SIGTERM instead of a
SIGKILL to allow the process to close in a cleaner manner
Signed-off-by: Shlomi Livne <shlomi@cloudius-systems.com >
2015-01-04 17:17:40 +02:00
Tomasz Grabiec
c2fe4c3e29
memcached/tests.py: wait for memcached process before proceeding
...
To ensure that the old process is no longer running when the new one
is started.
2014-12-30 17:00:44 +02:00
Tomasz Grabiec
16f4b7dec7
tests: make test_response_spanning_many_datagrams immune to value order
2014-12-16 16:30:50 +02:00
Avi Kivity
3e4c53300d
Merge branch 'mq' of ssh://github.com/cloudius-systems/seastar-dev
...
Multiqueue support for #cpu != #q, from Gleb.
2014-12-16 11:11:22 +02:00
Gleb Natapov
fbef83beb0
net: support for num of cpus > num of queues
...
This patch introduce a logic to divide cpus between available hw queue
pairs. Each cpu with hw qp gets a set of cpus to distribute traffic
to. The algorithm doesn't take any topology considerations into account yet.
2014-12-16 10:53:41 +02:00
Gleb Natapov
7ac3ba901c
net: rework packet forwarding logic
...
Instead of forward() deciding packet destination make it collect input
for RSS hash function depending on packet type. After data is collected
use toeplitz hash function to calculate packet's destination.
2014-12-16 10:53:41 +02:00