Archive for the ‘Spider’ Category

[MySQL][Spider]Spider-2.6 released

Октябрь 18th, 2009
I'm pleased to announce the release of Spider storage engine version 2.6(beta).
Spider is a Storage Engine for database sharding.
http://spiderformysql.com/

The main changes in this version are following.
- Add server parameter "spider_remote_access_charset", "spider_remote_autocommit", "spider_remote_sql_log_off" and "spider_remote_trx_isolation".
  These parameters are setted by Spider at connecting remote server. But it does not need to be setted if you know it previously and no need to change it. In this case, you can set these parameters for improvement connecting performance.

Please see "99_change_logs.txt" in the download documents for checking other changes.
Thanks to Giuseppe for bug report.

Enjoy!

PlanetMySQL Voting: Vote UP / Vote DOWN

Spider and vertical partition engines with new goodies

Октябрь 15th, 2009

sharding for the masses

The Spider storage engine should be already known to the community. Its version 2.5 has recently been released, with new features, the most important of which is that you can execute remote SQL statements in the backend servers. The method is quite simple. Together with Spider, you also get an UDF that executes SQL code in a remote server. You send a query with parameters saying how to connect to the server, and check the result (1 for success, 0 for failure). If the SQL involves a SELECT, the result can be sent to a temporary table. Simple and effective.

In addition to the Spider engine, Kentoku SHIBA has also created the vertical partitioning engine. Instead of splitting tables by record, you split them by columns. You can define a table with column A and column B, with primary key K, and another table with column C and column D, with primary key K. The vertical partition engine allows you to define a table with columns K, A, B, C, D, which looks to the user like a regular column. The backend tables can be of any engine.
There is a MySQL University session about the Spider and VP engines today at 15:00 CEST. Free attendance!

PlanetMySQL Voting: Vote UP / Vote DOWN

MySQL University: The Spider Storage Engine

Октябрь 12th, 2009

This Thursday (October 15th, 13:00 UTC), Giuseppe Maxia will present the Spider Storage Engine. Here's from the abstract: Everybody needs sharding. Which is not easy to maintain. Being tied to the application layer, sharding is hard to export and to interact with. The Spider storage engine, a plugin for MySQL 5.1 and later, solves the problem in a transparent way. It is an extension of partitioning. Using this engine, the user can deal transparently with multiple backends in the server layer. This means that the data is accessible from any application without code changes. This lecture will briefly introduce MySQL partitioning, and then show how to create and use the Spider engine, with some practical examples. The talk covers the latest version of the Spider engine, which includes a condition pushdown feature that increases performance significantly.

For MySQL University sessions, point your browser to this page. You need a browser with a working Flash plugin. You may register for a Dimdim account, but you don't have to. (Dimdim is the conferencing system we're using for MySQL University sessions. It provides integrated voice streaming, chat, whiteboard, session recording, and more.) All MySQL University sessions are recorded, that is, slides and voice can be viewed as a Flash movie (.flv). You can find those recordings on the respective MySQL University session pages which are listed on the MySQL University home page.

MySQL University is a free educational online program for engineers/developers. MySQL University sessions are open to anyone, not just Sun employees. Sessions are recorded (slides and audio), so if you can't attend the live session you can look at the recording anytime after the session.

Here's the schedule for the upcoming weeks:

  • October 22: Dual Master Setups With MMM (Arjen Lentz)
  • October 29: MySQL scalability on SPARC & INTEL X5500 (Nehalem) (Benoit Chaffanjon)
  • November 12: Gearman for MySQL (Giuseppe Maxia)
  • November 19: memcached Functions for MySQL (UDFs) (Patrick Galbraith)
  • December 3: Practical Full-Text Search in MySQL (Bill Karwin)

The schedule is not engraved in stone at this point. Please visit http://forge.mysql.com/wiki/MySQL_University#Upcoming_Sessions for the up-to-date list. On that page, you can also find the starting time for many time zones.


PlanetMySQL Voting: Vote UP / Vote DOWN

[MySQL][Spider][VP]Spider-2.5 Vartical Partitioning-0.5 released

Октябрь 5th, 2009
I'm pleased to announce the release of Spider storage engine version 2.5(beta) and Vertical Partitioning storage engine version 0.5(alpha).
Spider is a Storage Engine for database sharding.
http://spiderformysql.com/
Vertical Partitioning is a Storage Engine for vertical partitioning for a table.
http://launchpad.net/vpformysql

The main changes in this version are following.
- The standalone compilation with Vertical Partitioning storage engine is now available.

- Vertical Partitioning can be used for multi-step partitioning.
  Example:
    create table a(a int primary key)engine=myisam;
    create table b(a int primary key)engine=vp comment 'tnl "a"';
    create table c(a int primary key)engine=vp comment 'tnl "b"';

- Add table parameter "bgs_mode", "bgi_mode" and "bgu_mode".
- Add server parameter "vp_bgs_mode", "vp_bgi_mode" and "vp_bgu_mode".
  Parallel search and update from Vertical Partitioning to Spider are now available by using this parameters.

Please see "99_change_logs.txt" in the download documents for checking other changes.

Enjoy!

PlanetMySQL Voting: Vote UP / Vote DOWN

[MySQL][Spider][VP]Spider-2.4 Vartical Partitioning-0.4 released

Сентябрь 27th, 2009
I'm pleased to announce the release of Spider storage engine version 2.4(beta) and Vertical Partitioning storage engine version 0.4(alpha).
Spider is a Storage Engine for database sharding.
http://spiderformysql.com/
Vertical Partitioning is a Storage Engine for vertical partitioning for a table.
http://launchpad.net/vpformysql

The main changes in this version are following.
- "Engine-condition-pushdown" is available on Vertical Partitioning with Spider.

Please see "99_change_logs.txt" in the download documents for checking other changes.
Thanks to Gennady for bug report.

Enjoy!

PlanetMySQL Voting: Vote UP / Vote DOWN

[MySQL][Spider]Spider storage engine 2.3 released

Сентябрь 12th, 2009
I'm pleased to announce the release of Spider storage engine version 2.3(beta).
Spider is a Storage Engine for database sharding.
http://spiderformysql.com/

The main changes in this version are following.
- Add UDF parameter "connection_channel".
  This parameter is used for increasing background parallelism to same remote server by using multiple connections.

Please see "99_change_logs.txt" in the download documents for checking other changes.

Enjoy!

PlanetMySQL Voting: Vote UP / Vote DOWN

[MySQL][Spider]Spider storage engine 2.2 released

Сентябрь 6th, 2009
I'm pleased to announce the release of Spider storage engine version 2.2(beta).
Spider is a Storage Engine for database sharding.
http://spiderformysql.com/

The main changes in this version are following.
- Add UDF parameter "iop000".
  You can use "ignore" and "replace" at inserting records to temporary table list's tables using this parameter.

Please see "99_change_logs.txt" in the download documents for checking other changes.

Enjoy!

PlanetMySQL Voting: Vote UP / Vote DOWN

[MySQL][Spider]Spider storage engine 2.1 released

Август 29th, 2009
I'm pleased to announce the release of Spider storage engine version 2.1(beta).
http://spiderformysql.com/

The main changes in this version are following.
- Add UDFs "spider_direct_sql" and "spider_bg_direct_sql".
  These UDFs execute hand writing SQLs on remote server by using Spider's table link and store result sets in temporary tables.
  Main usages are following.
  1.Maintenance remote servers.
    (Create table on remote servers for Spider's link tables, etc.)
  2.Use every resources (excluding table) on remote servers.
  3.Mass update of the bulk data. (Update all rows in tables, etc.
    There are next advantages. It is possible to update it in parallel
    with multiple remote servers. The amount of the data transfer of
    a local server and remote servers can be reduced)
  4.Aggregate by 2-steps. (For DWH etc)
    First step: Aggregate on remote servers and collect result
                    to local server.
    Second step: Aggregate on local server.
    (There are next advantages. It is possible to aggregate it in
    parallel with multiple remote servers. The amount of the data
    transfer of a local server and remote servers can be reduced)

Example of 2-steps aggregating
(Count the number of rows in 7 shards tables from local server)
-------------------------------------------------------------------------------
Prepare for aggregating:
mysql> create table target_hosts (host char(17))engine=myisam;
Query OK, 0 rows affected (0.01 sec)

mysql> insert into target_hosts (host) values ('192.168.22.13'),('192.168.22.14'),('192.168.22.15'),('192.168.22.16'),('192.168.22.51'),('192.168.22.52'),('192.168.22.53');
Query OK, 7 rows affected (0.00 sec)
Records: 7  Duplicates: 0  Warnings: 0

mysql> create temporary table a (a int)engine=myisam;
Query OK, 0 rows affected (0.00 sec)

Execute aggregating:
mysql> select sum(a.a) from a, (select sum(spider_direct_sql('select count(*) from data01', 'a', concat('srv "s", host "', host, '"'))) cnt from target_hosts) c;
+-----------+
| sum(a.a)  |
+-----------+
| 117641811 |
+-----------+
1 row in set (40.86 sec)

mysql> truncate table a;
Query OK, 0 rows affected (0.00 sec)

mysql> select sum(a.a) from a, (select spider_bg_direct_sql('select count(*) from data01', 'a', concat('srv "s", host "', host, '"')) cnt from target_hosts) c;
+-----------+
| sum(a.a)  |
+-----------+
| 117641811 |
+-----------+
1 row in set (5.91 sec)
-------------------------------------------------------------------------------

Please see "99_change_logs.txt" in the download documents for checking other changes.

Enjoy!

PlanetMySQL Voting: Vote UP / Vote DOWN

Sharding for the masses: Introducing the SPIDER storage engine (OpenSQLCamp @ FrOSCon)

Август 28th, 2009

This is the Sharding for the masses: Introducing the SPIDER storage engine by Giuseppe Maxia, given at OpenSQLCamp, at FrOSCon, in August 2009. These are somewhat live notes, and the slides are available too.

Why sharding? Scaling, of course. The MySQL way to solve this, is replication (even Yahoo! and Google use this).

When the master doesn’t have enough resources to cope with what you do (i.e. large data sets), replication chokes.

You can use proxies for sharding. There exists MySQL Proxy (can be programmed using a scripting language – Lua), HSCALE (built on top of MySQL Proxy), SpockProxy (a fork of MySQL Proxy, without LUA scripting, specialised for sharding), in the market these days. This however, is the single point of failure – everything has to pass through one proxy.

Enter SPIDER – a MySQL storage engine, built on top of the partitions engine. It associates a partition with a remote server, and is transparent to the user. Its developed by Kentoku Shiba.

Installation: Get 5.1.37 sources, then get the source code for Spider 1.0, and then get the patch for condition pushdown.

Why the condition pushdown patch? Remote server works less, by receiving the condition. The SPIDER engine without the condition pushdown patch is still fast, but it can be more than 10x faster with condition pushdowns.

http://dev.mysql.com/doc/refman/5.1/en/condition-pushdown-optimization.html (works with NDBCLUSTER), http://dev.mysql.com/doc/refman/5.4/en/condition-pushdown-optimization.html (works with MyISAM). The patch by Kentoku, will add cond_push and cond_pop, to ha_partition – so now, every storage engine that uses table partitioning can get condition pushdown through ha_partition.

You need to setup the engine first: http://datacharmer.org/downloads/spider_setup.sql (the SQL is also available in the DOCS).

spider_remote_employees.sql – use this in conjunction with http://launchpad.net/test-db/ – a good example of how to use the SPIDER storage engine.



PlanetMySQL Voting: Vote UP / Vote DOWN

[MySQL][Spider]Spider storage engine 2.0 released

Август 22nd, 2009
I'm pleased to announce the release of Spider storage engine version 2.0(beta).
http://spiderformysql.com/
From this time, version 1.x is stable releases, version 2.x is development releases for new features.

The main changes in this version are following.
- Add table parameter "semi_table_lock_connection".
- Add server parameter "spider_semi_table_lock_connection".
  Spider has "spider_semi_trx", "spider_semi_trx_isolation", (for transactional tables like InnoDB) "spider_semi_table_lock" and "semi_table_lock" (for non transactional tables like MyISAM) options for consistent reading at remote servers during executing 1 SQL at local server. But you must use different connections for transactional tables and non transactional tables because "semi_table_lock" causes implicit transaction commit.
  "semi_table_lock_connection" and "spider_semi_table_lock_connection" can use different connection for transactional tables and non transactional tables by checking that "semi_table_lock" is enabled.

Please see "99_change_logs.txt" in the download documents for checking other changes.

Enjoy!

PlanetMySQL Voting: Vote UP / Vote DOWN