Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

TokuDBv7.0.

4withFractalTreeIndexing
for
MySQLv5.5.30
MariaDBv5.5.30
QuickStartGuideforLinux

TokuDBQuickStartGuideTokuDBv7.0.4

Notice:Tokutek,TokuDB,andFractalTreeareregisteredtrademarksofTokutek,Inc.
MySQL,InnoDB,andOracleareregisteredtrademarksofOracleCorporation.
MariaDBisregisteredtrademarkofMontyProgramAB.

TableofContents
TableofContents
1.GettingStarted
2.SystemandHardwareRequirements
3.Installation
3.1Downloading
3.2InstallingTokuDBFromScratch
3.3UpgradingFromaPreviousReleasesofTokuDB
3.4ReplaceanExistingMySQLInstance
3.5LocalorUserSpaceInstallation
3.6VerifytheInstallation
4.CreatingTablesandLoadingData
4.1CreatingTokuDBTables
4.2LoadingData
4.3MigratingDatafromanExistingDatabase
5.AdditionalQuestionsandSupport
A.Appendix
A.1.BulkLoadingData
A.2.ConsiderationstoRunTokuDBinProduction
A.2.1.Memoryallocation
A.2.2.SpecifyingtheLocationforFiles
A.3InstallingTokuDBforMariaDBonUbuntuServer

TokuDBQuickStartGuideTokuDBv7.0.4

1.GettingStarted
ThisguideprovidesinstructionsforinstallingandgettingstartedwithTokuDBforMySQL.
TokuDBisahighlyscalable,zeromaintenancedowntimestorageengineforMySQLandMariaDBthatuses
FractalTreeIndexes.ItenablesMySQLandMariaDBtoscalefromGBstoTBsandprovidesimprovedquery
performance,excellentcompression,andhotschemaflexibility.TokuDBrequiresnochangestoMySQL
applicationsorcodeandisfullyACIDandMVCCcompliant.
ProvidingnearseamlesscompatibilityforMySQLapplications,dataisloaded,inserted,andqueriedusing
standardMySQLcommands,withnorestrictionsorspecialrequirements.Tablescanbeindividuallydefinedto
useTokuDB,MyISAM,InnoDBorotherMySQLcompliantstorageengines.
AdditionalfeaturesuniquetoTokuDBinclude:
Hotschemachanges
Hotindexcreation:TokuDBtablessupportinsertions,deletionsandquerieswithnodowntime
whileindexesarebeingaddedtothattable
Hotcolumnaddition,deletion,expansion,andrename:TokuDBtablessupportinsertions,
deletionsandquerieswithminimaldowntimewhenanaltertableadds,deletes,expands,or
renamescolumns.
Fastrecoverytime(seconds,nothoursordays)
Immunitytodatabasedisorderor"aging"andthegradualperformancedegradationitcauses
Upto25xdatacompression
Eliminatesslavelag

2.SystemandHardwareRequirements
OperatingSystems:TokuDBv7.0.4iscurrentlysupportedon64bitLinuxonly.Formalsupportisprovidedfor
CentOSv5.1v6.2.TokuDBisexpectedtoworkonotherLinuxdistributions,althoughsupportwillbeprovided
onlyonabesteffortbasis.
AvirtualmachineimageisavailableforevaluationsonWindowsandMac,pleasecontactusat
support@tokutek.comformoreinformation.
Memory:TokuDBRequiresatleast1GBofmainmemorybutforbestresults,werecommendtorunwithat
least2GBofmainmemory.
Diskspaceandconfiguration:Pleasemakesuretoallocateenoughdiskspacefordata,indexesandlogs.In
ourusers'experience,TokuDBachievesupto25xspacesavingsondataandindexesoverInnoDBduetohigh
compression.

3.Installation
TokutekprovidesabinaryversionofMySQL5.5.30andMariaDB5.5.30withafewminorchangestosupport
TokuDB.TheTokuDB,MyISAMandInnoDBstorageenginesareincludedinthedistributionfiles.TheTokutek

TokuDBQuickStartGuideTokuDBv7.0.4

distributionincludesboththeMySQLserverandclientforyoursystem.
TheinstallationofMySQLfromatarballreleasefileisdescribednicelyintheMySQL5.5referencemanual:
http://dev.mysql.com/doc/refman/5.5/en/installingbinary.html.Thefollowinginstructionsarebasedonitwith
informationspecifictoTokuDB.

3.1Downloading
Togetstarted,navigatetoTokutek'sSupportPage:http://www.tokutek.com/support
Loginanddownloadthisfiletoyourdownloaddirectory.Thefilenameshouldfollowtheconvention:
[mysql|mariadb]<mysql|mariadbversion>tokudb<tokudbversion&build>linuxx86_64.tar.gz.Forthe
purposesofthisdocument,we'llusethenameofthetarballcorrespondingtoMySQL5.5.30withTokuDB
v7.0.4,makesureyouusethenameofthetarballcorrespondingtothefileyoudownloaded.
Afterdownloading,optionallyverifytheMD5checksumbycomparingtheresultsofthefollowingcommandto
theMD5checksumonthesupportpage:
md5summysql5.5.30tokudb7.0.4linuxx86_64.tar.gz

Atthispointitisagoodideatodeterminethetypeofinstallationyouwishtoperform.Theoptionsare:

InstallingTokuDBonanewserverwithnopreviousMySQLinstallation(see3.2)
InstallingTokuDBtoreplaceMySQL(see3.2and3.4)
UpgradingfromapreviousTokuDBversion(see3.3)
Localoruserspaceinstallation,optionallyusingMySQLSandbox(see3.5)

3.2InstallingTokuDBFromScratch
Alltheoperationshavetobeperformedwithadministrationprivileges(aka'root'user)sinceyouwillneedto
performprivilegedoperations.PleasecheckwithyourspecificLinuxdistributiontheappropriatemethodto
performprivilegedoperations.

a. CreateaMySQLspecificgroup.ForCentOSdistributions,thegroupidorGIDissetto27.Other
Linuxdistributionsmayvary,evenacrossinstancesofthesamedistribution.Itisagoodideatoseta
uniformGIDacrossallservers.WewilluseGID927fortherestofthisdocument.
groupaddg927mysql

b. CreateaMySQLsystemuser.SimilartoGID,UIDinCentOSdistributionsissetto27.Theuser
needstobedefinedasa'systemuser',whichimpliesthatitwon'thavealoginshellandhomedirectory.
AswiththeGID,wewilluseUID927fortherestofthisdocument.
useraddru927gmysqlmysql

c. Createtheinstallationbasedirectory.Youmayspecifyadifferentsubdirectorytreetofollowyour
installationsstandard.
mkdirpv/opt/tokutek

d. Expandthetarballyoudownloadedfromourwebsiteunderthebasedirectory.Youmayuseother

TokuDBQuickStartGuideTokuDBv7.0.4

directories(ie:/usr/localoraprivatedirectory).
cd/opt/tokutek
tarxvzf/path/to/mysql5.5.30tokudb7.0.4linuxx86_64.tar.gz

e. Createasymboliclinkpointingtothenewlycreatedirectory.Thiswillsimplifyfutureupgradesand/or
reinstallationsbyredifiningthesymboliclinktoanewdirectory:
lnsvmysql5.5.30tokudb7.0.4linuxx86_64mysql

f.

Changetheownershipofthenewdirectoryandit'scontentstomysql:mysql:
cdmysql
chownRvmysql:mysql.

g. Createadefaultconfigurationfile.Youwillhavetoeditthisfileasneeded.Youmayleavemostof
thedefaultmemoryallocationvaluesasistoallowTokuDBtouseasmuchRAMaspossible.
cpvsupportfiles/mysmall.cnf/etc/my.cnf

h. Adddefaultdataandbinarydirectories,andmysqlduser.Editthe/etc/my.cnffiletospecifythe
databasedirectory,thelocationforthebinariesandtheusertouseforthemysqldprocess.These
valuesaregoingtobeneededtomakesurethenextstepsucceeds.Addthefollowinglinesinthe
[mysqld]sectionofthefilereplacingtheactualvaluesasneeded:
datadir=/var/lib/mysql
basedir=/opt/tokutek/mysql
user=mysql

i. Youmightneedtoedittheresulting/etc/my.cnffurthertoaccommodateforothernondefaultsettings.
j.

Createthesystemtablesbyrunningthefollowingscript.Ifneeded,youmayspecifytheoptions
'basedir'and'datadir'withtheproperpathsbeforethe'user'option:
scripts/mysql_install_dbuser=mysql

k. Createalinkin/etc/init.dtostartTokuDB'sserverdaemonasaservice.Youwillneedto:
i. Editthe'mysql.server'fileandmakesurethatbasedirissetproperly.Lookforthelinestarting
with'basedir='andadd'/opt/tokutek/mysql'(orthedirectoryunderwhichyouinstalledthetarball)
afterthe'='sign.Thisisnotneededifthevariablesaresetupinthe/etc/my.cnffile.

ii. Createasymboliclinkunder/etc/init.dpointingtothemysql.serverscript:
lnsv/opt/tokutek/mysql/supportfiles/mysql.server/etc/init.d/mysql

l.

StartMySQLservice:
servicemysqlstart

YoumaywanttomodifyyourPATHenvironmentvariabletoincludethesubdirectorywiththeclientutilities:
/opt/tokutek/mysql/bin.

TokuDBQuickStartGuideTokuDBv7.0.4

Pleaserefertothesection3.6VerifytheInstallationtoconfirmthateverythingisrunningasexpected.

3.3UpgradingFromaPreviousReleasesofTokuDB
TokuDBv7.0.4supportsautomaticupgradesfromTokuDBversions4.1,5.x,and6.0usingthesame
configurationanddatafilesfromtheolderversions.
ItishighlyrecommendedthatyouhaveafullworkingbackupofyourdatabeforeupgradinganyMySQLversion.
ThebackupshouldincludetheMySQLconfigurationfilesaswell.
Alltheoperationshavetobeperformedwithadministrationprivileges(aka'root'user)sinceyouwillneedto
performprivilegedoperations.PleasecheckwithyourspecificLinuxdistributiontheappropriatemethodto
performprivilegedoperations.

a. Createtheinstallationbasedirectory,unlessitalreadyexists.Youmayspecifyadifferent
subdirectorytreetofollowyourinstallationsstandard.
mkdirpv/opt/tokutek

b. Expandthetarballyoudownloadedfromourwebsiteunderthebasedirectory.
cd/opt/tokutek
tarxvzf/path/to/mysql5.5.30tokudb7.0.4linuxx86_64.tar.gz

c. Shutdowntheexistinginstance.Makesurethatitwasacleanshutdown.Itisimportanttomakesure
therearenopendingtransactionsinthelogfilespriortotheupgradetoavoidanypotentialdata
corruption.
mysqladminshutdown

d. Createasymboliclinkpointingtothenewlycreateddirectory.
lnsvmysql5.5.30tokudb7.0.4linuxx86_64mysql

e. Createalinkin/etc/init.dtostartTokuDB'sserverdaemonasaserver.Youwillneedto:
a. Editthe'mysql.server'fileandmakesurethatbasedirissetproperly.Lookforthelinestarting
with'basedir='andadd'/opt/tokutek/mysql'(orthedirectoryunderwhichyouinstalledthetarball)
afterthe'='sign.
b. Createasymboliclinkunder/etc/init.dpointingtothemysql.serverscript:
lnsv/opt/tokutek/mysql/supportfiles/mysql.server/etc/init.d/mysql

f.

StartthenewMySQLinstance.Makesuretherewerenoerrorsafterthestartupcompletedby
inspectingtheerrorlog.
servicemysqlstart

g. Runmysql_upgradetoupdatethesystemtableswithanychangessincethelastrelease.Itis
importantthatyourunthe'mysql_upgrade'utilityprovidedwithourbinaries.
/opt/tokutek/mysql/bin/mysql_upgrade

TokuDBQuickStartGuideTokuDBv7.0.4

Pleaserefertothesection3.6VerifyTokuDBInstallationtoconfirmthateverythingisrunningasexpected.
Youshouldalsoverifytheapplicationdata.

3.4ReplaceanExistingMySQLInstance
TheproceduretoreplaceanexistingMySQLinstanceshouldbethesameastoupgradefromanexisting
TokuDBinstance(section3.3).AfterconvertingyourtablestoTokuDB,youshouldcommentouttheglobal
optionsrelatedtomemorycaches(ie:innodb_buffer_pool%).
NOTE1:WhenupgradingfromaMySQL5.1versionusingInnoDBplugintoMySQL5.5orMariaDB,you
needtocommentoutthelinesspecifyingtheInnoDBpluginlibrariesinyourmy.cnffile.Toverifywhetheror
nottheoptionsareenabled,youcanusethecommand:
my_print_defaultsmysqld|grep"ha_inno"

ThiscommandshouldreturnnoresultsforTokuDBtostartcleanly.
NOTE2:StartingwithversionTokuDBv6.1.0,TokuDBissettobethedefaultstorageengine.When
migratingfromanexistingMySQLorMariaDBinstallation,youneedtospecifythedefaultstorageengineto
InnoDBorMyISAMbeforethefirstrun.Setoneofthefollowingoptionsinthe[mysqld]sectionofthemy.cnf
file:
or

defaultstorageengine=MyISAM
defaultstorageengine=InnoDB

Thissettingcanberemovedoncetheinstallationhasbeencompleted.
Afterrunningthemysql_upgradescript,runthefollowingSQLcommandstosetuptheTokuDBplugin.Usethe
'mysql'utility.YouwillneedtologinintoMySQLwithauserwithsufficientprivilegestoruntheinstallplugin
command:
installplugintokudbsoname'ha_tokudb.so'
installplugintokudb_user_datasoname'ha_tokudb.so'
installplugintokudb_user_data_exactsoname'ha_tokudb.so'
installplugintokudb_file_mapsoname'ha_tokudb.so'
installplugintokudb_fractal_tree_infosoname'ha_tokudb.so'
installplugintokudb_fractal_tree_block_mapsoname'ha_tokudb.so'
setglobaldefault_storage_engine=TokuDB

Pleaserefertothesection3.6VerifytheInstallationtoconfirmthateverythingisrunningasexpected.You
shouldalsoverifytheapplicationdata.

3.5LocalorUserSpaceInstallation
ItispossibletorunTokuDBasanyregularuser.Inordertodoso,youcanextractthetarballinaprivate
directoryandrunthecommandsfromthere.Youhavetomakesurethatanumberofconditionsaremetto

TokuDBQuickStartGuideTokuDBv7.0.4

avoidhavingpermissionissues:

NootherMySQLinstanceshouldberunningonthemachine.Ifthereisanotheroneinplace,youhave
tomakesureyourconfigurationwilluseadifferentport,loganddatafiles,andconfigurationfilesto
avoidconflicts.

Makesurethatyousetuptheloganddatadirectoriestoapathwhereyouruserhasfullreadandwrite
access

ReadtheMySQLDocumentationsectiononrunningmultipleinstancesforfulldetailsonhowtospecify
thedifferentoptions:5.3.3.RunningMultipleMySQLInstancesonUnix.

Thevariable'tokudb_cache_size'issetto50%ofphysicalRAMontheserver.Whenrunningmultiple
instancesofMySQLyoumayneedtoadjustittoamoresensiblevaluetoavoidmemoryoverallocation,
whichmaycausetheservertobecomeunresponsiveorcrashdifferentprocesses,includingMySQL
instances.
Ifyoudecidetousethisoption,considerusingMySQLSandbox.MySQLSandboxoffersanumberoftoolsto
installoneormoreMySQLinstancesasaregularusertakingcareofallconfigurationdetailsautomatically.
Eachinstancecanberunindependentlyoritcansetupdifferentreplicationtopologiesaswell.Asaresultof
theinstallationprocess,theenduserwillhaveanumberofscriptstostart,stopandconnecttoeachindividual
instancewithouttheneedtobeawareoftheconfigurationandruntimedetails.
TheproceduretoinstallTokuDBforMySQLSandboxisnodifferentthanregularMySQL.Youcanreadthe
instructionstocreateasinglesandboxhere.

3.6VerifytheInstallation
StartamysqlclientsessioninacommandlinewindowtoverifytheTokuDBstorageengineinstallation.Start
themysqlclientutilitywiththefollowingcommand:
/opt/tokutek/mysql/bin/mysql

Thedefaultsocketformysqldis/tmp/mysql.sock.Atthecommandpromptexecutethefollowingcommands:
showplugins

Theoutputshouldincludethefollowinglines:
|TokuDB|ACTIVE|STORAGEENGINE|ha_tokudb.so
|TokuDB_user_data|ACTIVE|INFORMATIONSCHEMA|ha_tokudb.so
|TokuDB_user_data_exact|ACTIVE|INFORMATIONSCHEMA|ha_tokudb.so
|TokuDB_file_map|ACTIVE|INFORMATIONSCHEMA|ha_tokudb.so
|TokuDB_fractal_tree_info|ACTIVE|INFORMATIONSCHEMA|ha_tokudb.so
|TokuDB_fractal_tree_block_map|ACTIVE|INFORMATIONSCHEMA|ha_tokudb.so

Alsoexecutethefollowingcommand:
showengines

TokuDBQuickStartGuideTokuDBv7.0.4

Theoutputshouldincludethefollowingline:
|TokuDB|YES|TokutekTokuDBStorageEngine

4.CreatingTablesandLoadingData
4.1CreatingTokuDBTables
TokuDBtablesarecreatedthesamewayasothertablesinMySQLbyspecifyingengine=TokuDBinthetable
definition.Forexample,
createtableTABLENAME(IDint(11)notnull)engine=TokuDB

createsatablewithnameTABLENAMEwithasinglecolumnIDandusestheTokuDBstorageenginetostore
itsdata.

4.2LoadingData
OnceTokuDBtableshavebeencreated,datacanbeinsertedorloadedusingstandardMySQLinsertorbulk
loadoperations.Forexample:
loaddatainfileDATA_FILEintotableTABLE_NAME

loadsthedatafromDATAFILEintothetableTABLENAME.SeetheMySQL5.5referencemanualformore
informationonloadingdata.Pleaseseetheuserguidefordetailsonhowtomanagethelogsizesinthiscase.
PleaseseetheTokuDBUsersGuidefordetailsonhowtomanagethelogsizeinthiscase.

4.3MigratingDatafromanExistingDatabase
ToconvertanexistingtablefromanotherstorageenginetousetheTokuDBengine,
altertable<tablename>engine=TokuDB

Ifyouprefertoretaintheoriginaltableortomanagelogsizemoreeffectively,youcandumpandreloaddata
intoaTokuDBtableinstead.SeetheFAQsectionintheTokuDBUsersGuidefordetailsondumpingand
reloadingandfordetailsonmanagingthelogsize.

5.AdditionalQuestionsandSupport
Tokuteklooksforwardtoyourfeedbackonthisproductandweencourageyoutocontactusbyemailat
support@tokutek.com.OurTechnicalServicesteammonitorsthisemailaddresstoensurepromptand
personalservice.

TokuDBQuickStartGuideTokuDBv7.0.4

TheTokuDBUserGuideandFrequentlyAskedQuestions(FAQ)areavailableonourwebsiteat
http://www.tokutek.com/resources/productdocs.
OurEvaluationGuidewillhelpyouunderstandallthecapabilitiesofTokuDBandhowtheyapplytoyourspecific
usecase,itcanbedownloadedathttp://www.tokutek.com/resources/tokudbevalguide.
Visitusathttp://www.tokutek.com/supportformoreinformation.

A.Appendix
A.1.BulkLoadingData
TheTokuDBbulkloaderimportsdatamuchfasterthanregularMySQLwithInnoDB.Tomakeuseoftheloader
youneedflatfilesineithercommaseparatedortabseparatedformat.TheMySQLLOADDATAINFILE
statementwillinvokethebulkloaderifthetableisempty.Keepinmindthatwhilethisisthemostconvenient
and,inmostcases,thefastestwaytoinitializeaTokuDBtable,itmaynotbereplicationsafeifappliedtothe
master.PleasecheckMySQL'sdocumentationonthesubject.
TheproceduretoobtainthelogicalbackupandthenbulkloadintoTokuDBshouldfollowthesesteps:
1. Createalogicalbackupoftheoriginaltable.TheeasiestwaytoachievethisisusingSELECTINTO
OUTFILE.Keepinmindthatthefilewillbecreatedontheserver.
SELECT*FROMmy_tableINTOOUTFILE'file_name.csv'

2. Theoutputfileshouldeitherbecopiedtothedestinationserverortheclientmachinefromwhereyou
plantoloaditfrom.
3. ToloadthedataintotheserveruseLOADDATAINFILE.Ifloadingfromamachineotherthantheserver
usethekeywordLOCALtopointtothefileonlocalmachine.Keepinmindthatyouwillneedenough
diskspaceonthetemporarydirectoryontheserversincethelocalfilewillbecopiedontotheserverby
theMySQLclientutility.
LOADDATA[LOCAL]INFILE'file_name.csv'

ItispossibletocreatetheCSVfileusingeither'mysqldump'orthe'mysql'clientutilityaswell,inwhichcasethe
resultingfilewillresideonalocaldirectory.Inthese2casesyouhavetomakesuretousethecorrect
commandlineoptionstocreateafilecompatiblewithLOADDATAINFILE.
Thebulkloaderwillusemorespacethannormalforlogsandtemporaryfileswhilerunning,makesurethatyour
filesystemhasenoughdiskspacetoprocessyourload.Asaruleofthumb,itshouldbeapproximately1.5xthe
sizeoftherawdata.Ifdiskspaceisaconcern,youcaninstructthebulkloadertoavoidusingtemporaryfiles
bysettingthevalueof'tokudb_load_save_space'globalvariabletoONbeforestartingtheload.Forexample
usingthestatement:

10

TokuDBQuickStartGuideTokuDBv7.0.4

SETGLOBALtokudb_load_save_space=ON

Note1:PleasereadtheoriginalMySQLdocumentationtounderstandtheneededprivilegesandreplication
issuesneededaroundLOADDATAINFILE.

A.2.ConsiderationstoRunTokuDBinProduction
InmostcasesthedefaultoptionsshouldbeleftinplacetorunTokuDB,howeveritisagoodideatoreview
someoftheconfigurationparameters.

A.2.1.Memoryallocation
TokuDBwillallocate50%oftheinstalledRAMforitsowncache(globalvariable'tokudb_cache_size').While
thisisoptimalinmostsituations,therearecaseswhereitmayleadtomemoryoverallocation.Ifthesystem
triestoallocatemorememorythanisavailablethemachinewillbeginswappingandrunmuchslowerthan
normal.
The2mostfrequentcaseswhenitisnecessarytosetthe'tokudb_cache_size'toavalueotherthanthedefault
are:

RunningothermemoryheavyprocessesonthesameserverasTokuDB:Inmanycasesthe
databaseprocessneedstosharethesystemwithotherserverprocesseslikeadditionaldatabase
instances,httpserver,applicationserver,emailserver,monitoringsystemsandothers.Inorderto
properlyconfigureTokuDB'smemoryconsumption,it'simportanttounderstandhowmuchfree
memorywillbeleftandassignasensiblevalueforTokuDB.Thereisnofixedrule,butaconservative
choicewouldbe50%ofavailableRAMwhilealltheotherprocessesarerunning.Iftheresultisunder
2GB,youshouldconsidermovingsomeoftheotherprocessestoadifferentsystemorusinga
dedicateddatabaseserver.
'tokudb_cache_size'isastaticvariable,soitneedstobesetbeforestartingtheserverandcannotbe
changedwhiletheserverisrunning.Forexample,tosetupTokuDB'scacheto4G,addthefollowing
linetoyourmy.cnffile:
tokudb_cache_size=4G

SystemusingInnoDBandTokuDB:WhenusingboththeTokuDBandInnoDBstorageenginesyou
needtomanagethecachesizeforeach.Forexample,onaserverwith16GofRAMyoucouldusethe
followingvaluesinyourconfigurationfile:
innodb_buffer_pool_size=2G
tokudb_cache_size=8G

11

UsingTokuDBwithFederatedorFederatedXtables:TheFederatedengineinMySQLand
FederatedXinMariaDBallowyoutoconnecttoatableinaremoteserverandqueryitasifitwerea
localtable(pleaseseetheMySQLdocumentation:14.11.TheFEDERATEDStorageEnginefordetails).
Whenaccessingtheremotetabletheseenginescouldimportthecompletetablecontentstothelocal
servertoexecuteaquery.Inthiscase,youwillhavetomakesurethatthereisenoughfreememoryon
theservertohandletheseremotetables.Forexample,ifyoureremotetableis8Ginsize,theserver
hastohavemorethan8GoffreeRAMtoprocessqueriesagainstthattablewithoutgoingintoswapping
orcausingakernelpanicandcrashtheMySQLprocess.Therearenoparameterstolimittheamount
ofmemorythattheFederatedorFederatedXenginewillallocatewhileimportingtheremotedataset.

TokuDBQuickStartGuideTokuDBv7.0.4

A.2.2.SpecifyingtheLocationforFiles
AswithInnoDBitispossibletospecifydifferentlocationsthanthedefaultforTokuDB'sdata,logandtemporary
files.Thiswayyoumaydistributetheloadandcontrolthediskspace.The3variablesare:

tokudb_data_dir:ThisvariableconguresthedirectorynamewheretheTokuDBtablesarestored.
ThedefaultlocationforTokuDB'sdatafilesistheMySQLdatadirectory.

tokudb_log_dir:ThisvariableconguresthedirectorynamewheretheTokuDBloglesarestored.

ThedefaultlocationforTokuDB'slogfilesistheMySQLdatadirectory.Conguringaseparatelog
directoryissomewhatinvolvedandshouldbedoneonlyifabsolutelynecessary.Werecommendto
keepthedataandlogfilesunderthesamedirectory.

tokudb_tmp_dir:ThisvariableconguresthedirectorynamewheretheTokuDBbulkloaderstores
temporaryles.Thebulkloadercancreatelargetemporaryleswhileitisloadingatable,soputting
thesetemporarylesonadiskseparatefromthedatadirectorycanbeuseful.Forexample,itcan
makesensetouseahighperformancediskforthedatadirectoryandaveryinexpensivediskforthe
temporarydirectory.ThedefaultlocationforTokuDB'stemporarylesistheMySQLdatadirectory.

A.3InstallingTokuDBforMariaDBonUbuntuServer
TokuDBforMariaDBhasanunmatcheddependencyonUbuntuServerv12.04.OurMariaDBbuildisdependent
onlibeventv1.4,UbuntuServersinstalllibeventv2.0bydefault.
WhentryingtostarttheMySQLservicewithoutinstallingtheproperlibrary,itwillfailwiththefollowingerrorin
thelogfile:
/opt/tokutek/mysql/bin/mysqld:errorwhileloadingsharedlibraries:libevent1.4.so.2:
cannotopensharedobjectfile:Nosuchfileordirectory

Toverifywhichversionyouhaveinplaceyoumayusethefollowingcommand:
dpkgqueryllibevent*
|Status=Not/Inst/Conffiles/Unpacked/halFconf/Halfinst/trigaWait/Trigpend
|/Err?=(none)/Reinstrequired(Status,Err:uppercase=bad)
||/NameVersionDescription
+++====================================================================================
========================================
iilibevent1.421.4.14bstable0ubuntu1asynchronousevent
notificationlibrary
iilibevent2.052.0.16stable1Asynchronousevent
notificationlibrary

Ifthelineforlibevent1.4*isnotinthelist,youmayinstallitbyissuingthecommand:

12

TokuDBQuickStartGuideTokuDBv7.0.4

sudoaptgetinstalllibevent1.4

13

TokuDBQuickStartGuideTokuDBv7.0.4

You might also like