WiredTiger	configura/on	variables	-	
Looking	under	the	hood	
Antonios	Giannopoulos	
Database	Administrator	–	Rackspace	
	
Percona	Live	Europe	2016
Agenda		
We	are	going	to	discuss	:	
	MongoDB	WiredTiger	Configura/on	Variables	
	
-  What	they	mean?	
-  How	to	configure/change?	
-  Benchmarks
Benchmark	specs	
Rackspace	OnMetal	Cloud	Server	v2	
12	cores		
32GB	RAM		
2x800GB	SSDs	(RAID	1)	
	
MongoDB	3.2.9		
	
Sysbench	for	MongoDB	by	Tim	Callaghan	using	default	
se[ngs
Benchmark	specs	
Sysbench:	
1)  Creates	16	collec/ons	10	million	documents	each	
2)  	Executes	a	mixed	workload	for	10	minutes		
	
Load:	Comple/on	/me	for	(1)	
TPS	CUM:	Average	number	of	Sysbench	transac/ons		
TPS	INT:	Number	of	Sysbench	transac/ons		
	
Samples	are	collected	every	10	seconds
WT	configura/on/Files	
Three	ways	to	change	WT	variables:	
mongod.conf:	engineConfig.configString	
run/me:	db.adminCommand(	{	setParameter:…})		
configura/on	file(s):	(WiredTiger.basecfg,	WiredTiger.config)	
	
The	order	of	configura/on	is:		
WiredTiger.basecfg	file		
wired/ger_open	configura/on	string	argument,	
WiredTiger.config	file,	
WIREDTIGER_CONFIG	environment	variable
WT	configura/on/mongod.conf	
	engineConfig:		
	 	cacheSizeGB:	<number>		
	 	journalCompressor:	<string>		
	 	directoryForIndexes:	<boolean>		
												configString:	<string>	,	<string>	…	
	collec/onConfig:		
	 	blockCompressor:	<string>		
	indexConfig:		
	 	prefixCompression:	<boolean>	
								setParameter:	
		 									wiredTigerConcurrentReadTransac/ons:	<number>	
		 									wiredTigerConcurrentWriteTransac/ons:	<number>
WT	configura/on/mongod.conf	
	engineConfig:		
	 	cacheSizeGB:	<number>		
	 	journalCompressor:	<string>		
	 	directoryForIndexes:	<boolean>		
												configString:	<string>	,	<string>	…	
	collec/onConfig:		
	 	blockCompressor:	<string>		
	indexConfig:		
	 	prefixCompression:	<boolean>	
								setParameter:	
		 									wiredTigerConcurrentReadTransac/ons:	<number>	
		 									wiredTigerConcurrentWriteTransac/ons:	<number>
Journal	Benchmark	
Default:	Snappy	
Load:	10	minutes	and	58	seconds	
	
Without	compression:		
Load:	10	minutes	and	21	seconds	
	
Without	journal:		
Load:	8	minutes	and	35	seconds
Journal	(cum	tps)	
	
	
0	
200	
400	
600	
800	
1000	
1200	
0	 100	 200	 300	 400	 500	 600	 700	
default	
without	compression	
without	journal
Journal	(int	tps)	
	
	
0	
200	
400	
600	
800	
1000	
1200	
1400	
0	 100	 200	 300	 400	 500	 600	 700	
default	
without	compression	
without	journal
WT	configura/on/mongod.conf	
	engineConfig:		
	 	cacheSizeGB:	<number>		
	 	journalCompressor:	<string>		
	 	directoryForIndexes:	<boolean>		
												configString:<string>	,	<string>	…	
	collec/onConfig:		
	 	blockCompressor:	<string>		
	indexConfig:		
	 	prefixCompression:	<boolean>	
								setParameter:	
		 									wiredTigerConcurrentReadTransac/ons:	<number>	
		 									wiredTigerConcurrentWriteTransac/ons:	<number>
Compression	Algorithms	
snappy:	it	gathers	data	up	to	a	maximum	of	32KB,	
compresses	it,	and	if	compression	is	successful,	writes	the	
block	rounded	up	to	the	nearest	4KB.	
	
zlib:	it	gathers	more	data	and	compress	enough	to	fill	a	
32KB	block	on	disk.	
	
Configurable	per	collec/on:	
db.createCollec/on("foo",	{	storageEngine:	{	wiredTiger:	
{	configString:	"block_compressor=zlib"	}	}	})
blockCompressor	Benchmark	
Snappy:		
Load:	10	minutes	and	58	seconds	
	
Zlib:		
Load:	18	minutes	and	21	seconds	
	
Without	compression:	
Load:	10	minutes	and	45	seconds
blockCompressor	(cum	tps)	
	
	
0	
200	
400	
600	
800	
1000	
1200	
0	 100	 200	 300	 400	 500	 600	 700	
snappy	
zlib	
no	compression
blockCompressor	(int	tps)	
	
	
0	
200	
400	
600	
800	
1000	
1200	
1400	
1600	
0	 100	 200	 300	 400	 500	 600	 700	
snappy	
zlib	
none
WT	configura/on/mongod.conf	
	engineConfig:		
	 	cacheSizeGB:	<number>		
	 	journalCompressor:	<string>		
	 	directoryForIndexes:	<boolean>		
												configString:<string>	,	<string>	…	
	collec/onConfig:		
	 	blockCompressor:	<string>		
	indexConfig:		
	 	prefixCompression:	<boolean>	
									setParameter:	
		 									wiredTigerConcurrentReadTransac/ons:	<number>	
		 									wiredTigerConcurrentWriteTransac/ons:	<number>
Prefix	compression	
use	
used	
useful	
usefully	
usefulness	
useless	
uselessly	
uselessness
Prefix	compression	
use	
used	
useful	
usefully	
usefulness	
useless	
uselessly	
uselessness	
0:	use	
1:	0d	
2:	0ful	
3:	0fully	
4:	0less	
5:	0lessly	
6:	0lessness
Prefix	compression	
use	
used	
useful	
usefully	
usefulness	
useless	
uselessly	
uselessness	
0:	use	
1:	0d	
2:	0ful	
3:	0fully	
4:	0less	
5:	0lessly	
6:	0lessness	
0:	use	
1:	0d	
2:	0ful	
3:	2ly	
4:	0less	
5:	4ly	
6:	4ness
Prefix	compression	(load	/mes)	
Default:	Snappy	compression:		
Load:	10	minutes	and	58	seconds	
	
None:	Without	compression:	
Load:	09	minutes	and	51	seconds
Prefix	compression	(cum	tps)	
	
	
0	
200	
400	
600	
800	
1000	
1200	
0	 100	 200	 300	 400	 500	 600	 700	
default	
none
Prefix	compression	(int	tps)	
	
	
0	
200	
400	
600	
800	
1000	
1200	
1400	
0	 100	 200	 300	 400	 500	 600	 700	
default	
none
WT	configura/on/mongod.conf	
	engineConfig:		
	 	cacheSizeGB:	<number>		
	 	journalCompressor:	<string>		
	 	directoryForIndexes:	<boolean>		
												configString:<string>	,	<string>	…	
	collec/onConfig:		
	 	blockCompressor:	<string>		
	indexConfig:		
	 	prefixCompression:	<boolean>	
									setParameter:	
		 									wiredTigerConcurrentReadTransacKons:	<number>	
		 									wiredTigerConcurrentWriteTransacKons:	<number>
Concurrent	Transac/ons	
Specify	the	maximum	number	of	concurrent	read/write		transac/ons.	
	
Default	is	128	
	
mongod.conf	
	setParameter:	
		 									wiredTigerConcurrentReadTransac/ons:	<number>	
		 		
RunKme:	db.adminCommand(	{	setParameter:	1,	
wiredTigerConcurrentWriteTransac/ons:	<num>	}	)
Concurrent	Transac/ons	Benchmark	
64	Trx:	64	read/write	transcac/ons	
Load:	11	minutes	and	06	seconds	
	
128	Trx:	Default	-	128	read/write	transcac/ons	
Load:	10	minutes	and	58	seconds	
	
256	Trx:	256	read/write	transcac/ons	
Load:	10	minutes	and	46	seconds
Concurrent	Transac/ons	(cum	tps)	
	
	
0	
200	
400	
600	
800	
1000	
1200	
0	 100	 200	 300	 400	 500	 600	 700	
trx-128	
trx-64	
trx-256
Concurrent	Transac/ons	(int	tps)	
	
	
0	
200	
400	
600	
800	
1000	
1200	
1400	
0	 100	 200	 300	 400	 500	 600	 700	
trx-128	
trx-64	
trx-256
WT	configura/on/mongod.conf	
	engineConfig:		
	 	cacheSizeGB:	<number>		
	 	journalCompressor:	<string>		
	 	directoryForIndexes:	<boolean>		
												configString:	<string>	,	<string>	…	
	collec/onConfig:		
	 	blockCompressor:	<string>		
	indexConfig:		
	 	prefixCompression:	<boolean>	
									setParameter:	
		 									wiredTigerConcurrentReadTransac/ons:	<number>	
		 									wiredTigerConcurrentWriteTransac/ons:	<number>
WT	configura/on	
Every	WT	variable	can	be	assigned	to	configString		
	
We	are	going	to	examine	a	subset:	
-  evic/on_target	
-  evic/on_trigger	
-  evic/on_dirty_target	
-  evic/on_dirty_trigger	
-  evic/on.threads_min		
-  evic/on.threads_max		
-  direct_IO
Evic/on	
	
	
Resident	Objects	 Shared	cache
Evic/on	
	
	
Cache	saves	objects	(working	set)
Evic/on	
	
	
Evic/on	Triggers
Evic/on	
	
	
Evic/on	Candidates
Evic/on	
	
	
Evic/on	Target
evic/on_trigger	
evicKon_trigger	is	the	occupied	percentage	of	the	total	cache	size	that	
causes	evic/on	to	start.	
	
Default	value:	95%		
Acceptable	values:	Between	10	and	99	
	
RunKme:	db.adminCommand({setParameter:1,	
wiredTigerEngineRun/meConfig:"evic/on_trigger=71”})	
	
mongod.conf	:	evic/on_trigger=71	
	
WiredTiger.config:	evic/on_trigger=71
evic/on_target	
evicKon_target	is	the	overall	target	for	evic/on,	expressed	as	a	
percentage	of	total	cache	size.	
	
Default	value:	80%			
Acceptable	range:	Between	10	and	99	(lower	than	trigger)	
	
RunKme:	db.adminCommand({setParameter:1,	
wiredTigerEngineRun/meConfig:"evic/on_target=70"})	
	
mongod.conf	:	evic/on_target=70	
	
WiredTiger.config:	evic/on_target=70
Evic/on_trigger/target	Benchmark	
Default:	trigger/target:	95/80	
Load:	11	minutes	and	06	seconds	
	
95/90:	trigger/target:	95/90	
Load:	11	minutes	and	41	seconds	
	
90/89:		trigger/target:	90/89	
Load:	10	minutes	and	16	seconds	
	
95/94:	trigger/target:	95/94	
Load:	12	minutes	and	26	seconds
evic/on_trigger/target	(cum	tps)	
	
	
0	
200	
400	
600	
800	
1000	
1200	
0	 100	 200	 300	 400	 500	 600	 700	
default	
95	and	90	
90	and	89	
95	and	94
Evic/on_trigger/target	(int	tps)	
	
	
0	
200	
400	
600	
800	
1000	
1200	
1400	
1600	
0	 100	 200	 300	 400	 500	 600	 700	
default	
95	and	90	
90	and	89	
95	and	94
evic/on_dirty_trigger	
evicKon_dirty_trigger:		trigger	evic/on	when	the	cache	is	using	this	
much	memory	for	dirty	content,	as	a	percentage	of	the	total	cache	size.		
	
Default	value:	95%			
Acceptable	range:	Between	5	and	99	
	
RunKme:	db.adminCommand({setParameter:1,	
wiredTigerEngineRun/meConfig:"evic/on_dirty_trigger=71"})	
	
mongod.conf	:	evic/on_dirty_trigger=71	
	
WiredTiger.config:	evic/on_dirty_trigger=71
evic/on_dirty_target	
evicKon_dirty_target:	con/nue	evic/ng	un/l	the	cache	has	less	dirty	
pages	than	this	(as	a	percentage).	
		
Default:	80%		
Acceptable	range:		Between	5	and	99	(lower	than	trigger)	
	
RunKme:	db.adminCommand({setParameter:1,	
wiredTigerEngineRun/meConfig:"evic/on_dirty_target=70"})	
	
mongod.conf	:	evic/on_dirty_target=70	
	
WiredTiger.config:	evic/on_dirty_target=70
dirty_trigger/target	Benchmark	
Default:	trigger/target	95/80	
Load:	10	minutes	and	58	seconds	
	
20/5:	trigger/target	20/5	
Load:	31	minutes	and	20	seconds	
	
80/70:	trigger/target	80/70	
Load:	10	minutes	and	06	seconds
dirty_trigger/target	(cum	tps)	
	
	
0	
200	
400	
600	
800	
1000	
1200	
0	 100	 200	 300	 400	 500	 600	 700	
default	
20	and	5	
80	and	70
dirty_trigger/target	(int	tps)	
	
	
0	
200	
400	
600	
800	
1000	
1200	
1400	
1600	
0	 100	 200	 300	 400	 500	 600	 700	
default	
20	and	5	
80	and	70
evic/on	threads	
evicKon.threads_min	&	evicKon.threads	_max	:	the	minimum	and	maximum	
number	of	addi/onal	evic/on	threads	
	
Default:	1	and	4			
Acceptable	range:	between	1	and	20	
	
RunKme:	
db.adminCommand({setParameter:1,	
wiredTigerEngineRun/meConfig:"evic/on=(threads_min=2)"}	)	
	
mongod.conf	:	evic/on=(threads_max=2)	
	
WiredTiger.config:	evic/on=(threads_max=2)
evict_threads_min/max	Benchmark	
Default:	min/max	1/4		
Load:	10	minutes	and	58	seconds	
	
4	and	6:		min/max	4/6	
Load:	10	minutes	and	31	seconds	
	
2	and	8:	min/max	2/8	
Load:	10	minutes	and	11	seconds	
	
4	and	4:	min/max	4/4	
Load:	10	minutes	and	21	seconds
evict_threads_min/max	(cum	tps)	
	
	
0	
200	
400	
600	
800	
1000	
1200	
0	 100	 200	 300	 400	 500	 600	 700	
default	
4	and	6	
2	and	8	
4	and	4
evict_threads_min/max	(int	tps)	
	
	
0	
200	
400	
600	
800	
1000	
1200	
1400	
1600	
0	 100	 200	 300	 400	 500	 600	 700	
default	
4	and	6	
2	and	8	
4	and	4
direct_io	
		
	
STORAGE	 STORAGE	
FS	cache	WT	cache	 WT	cache	 FS	cache	
RAM	 RAM
direct_io	
•  minimize	the	opera/ng	system	cache	effects	of	I/O	to	and	
from	WiredTiger's	buffer	cache	
•  avoid	double-buffering	of	blocks	in	WiredTiger's	cache	and	
the	opera/ng	system	buffer	cache	
•  avoid	stalling	underlying	solid-state	drives	by	wri/ng	a	large	
number	of	dirty	blocks.	
	
WiredTiger.config:	direct_io=(data)	
	
mongod.conf	:		storage.wiredTiger.engineConfig.configString:	
direct_io=(data)
Direct	IO	Benchmark	
	
Default:	Without	Direct	IO	
Load:	10	minutes	and	58	seconds	
	
Direct	IO:		With	Direct	IO	
Load:	11	minutes	and	25	seconds
Direct	IO	(cum	tps)	
	
	
0	
200	
400	
600	
800	
1000	
1200	
0	 100	 200	 300	 400	 500	 600	 700	
default	
direct	IO
Direct	IO	(int	tps)	
	
	
0	
200	
400	
600	
800	
1000	
1200	
1400	
1600	
0	 100	 200	 300	 400	 500	 600	 700	
default	
direct	IO
Ques/ons?	
	
Thank	you!!!	
	
antonios.giannopoulos@rackspace.co.uk	
#iamantonios

More Related Content

PDF
Some analysis of BlueStore and RocksDB
PDF
Adaptive Linear Solvers and Eigensolvers
PPTX
Parallel computing in bioinformatics t.seemann - balti bioinformatics - wed...
PDF
Performance comparison of Distributed File Systems on 1Gbit networks
PPTX
Java 어플리케이션 성능튜닝 Part1
PDF
Revisão: Forwarding Metamorphosis: Fast Programmable Match-Action Processing ...
PDF
Kernel Recipes 2017 - What's new in the world of storage for Linux - Jens Axboe
PDF
An introduction and evaluations of a wide area distributed storage system
Some analysis of BlueStore and RocksDB
Adaptive Linear Solvers and Eigensolvers
Parallel computing in bioinformatics t.seemann - balti bioinformatics - wed...
Performance comparison of Distributed File Systems on 1Gbit networks
Java 어플리케이션 성능튜닝 Part1
Revisão: Forwarding Metamorphosis: Fast Programmable Match-Action Processing ...
Kernel Recipes 2017 - What's new in the world of storage for Linux - Jens Axboe
An introduction and evaluations of a wide area distributed storage system

What's hot (20)

PDF
Crimson: Ceph for the Age of NVMe and Persistent Memory
PDF
Evaluation of RBD replication options @CERN
PDF
Ceph RBD Update - June 2021
ODP
CRIU: Time and Space Travel for Linux Containers
PDF
LizardFS-WhitePaper-Eng-v3.9.2-web
PPTX
Am I reading GC logs Correctly?
PDF
Shared Memory Performance: Beyond TCP/IP with Ben Cotton, JPMorgan
PPTX
Pick diamonds from garbage
PDF
AppOS: PostgreSQL Extension for Scalable File I/O @ PGConf.Asia 2019
PDF
Shenandoah GC: Java Without The Garbage Collection Hiccups (Christine Flood)
PPT
FreeNAS backup solution
 
PDF
Xdp and ebpf_maps
PDF
Thanos - Prometheus on Scale
PDF
What’s new in 9.6, by PostgreSQL contributor
PDF
PostgreSQL na EXT4, XFS, BTRFS a ZFS / FOSDEM PgDay 2016
PPTX
Java memory problem cases solutions
PDF
Memory Bandwidth QoS
PDF
On heap cache vs off-heap cache
PDF
Comparison of foss distributed storage
PDF
Tacc Infinite Memory Engine
Crimson: Ceph for the Age of NVMe and Persistent Memory
Evaluation of RBD replication options @CERN
Ceph RBD Update - June 2021
CRIU: Time and Space Travel for Linux Containers
LizardFS-WhitePaper-Eng-v3.9.2-web
Am I reading GC logs Correctly?
Shared Memory Performance: Beyond TCP/IP with Ben Cotton, JPMorgan
Pick diamonds from garbage
AppOS: PostgreSQL Extension for Scalable File I/O @ PGConf.Asia 2019
Shenandoah GC: Java Without The Garbage Collection Hiccups (Christine Flood)
FreeNAS backup solution
 
Xdp and ebpf_maps
Thanos - Prometheus on Scale
What’s new in 9.6, by PostgreSQL contributor
PostgreSQL na EXT4, XFS, BTRFS a ZFS / FOSDEM PgDay 2016
Java memory problem cases solutions
Memory Bandwidth QoS
On heap cache vs off-heap cache
Comparison of foss distributed storage
Tacc Infinite Memory Engine
Ad

Viewers also liked (11)

PDF
12 karel debrabandere_evaluation_of_satellite_irradiation_data__at_200_sites
PDF
VCE - ENTER
PPTX
Raspberry pi
PPTX
期中報告
PPTX
第14組
PPTX
Introduction to Polyglot Persistence
PDF
4 andreas schneider, bifi psda, antofagasta (chile) 2015
PDF
63 matthiss comparison_of_pv_system_and_irradiation_models
PDF
MongoDB Sharding Fundamentals
PPTX
Presentacion reproducción
12 karel debrabandere_evaluation_of_satellite_irradiation_data__at_200_sites
VCE - ENTER
Raspberry pi
期中報告
第14組
Introduction to Polyglot Persistence
4 andreas schneider, bifi psda, antofagasta (chile) 2015
63 matthiss comparison_of_pv_system_and_irradiation_models
MongoDB Sharding Fundamentals
Presentacion reproducción
Ad

Similar to Antonios Giannopoulos Percona 2016 WiredTiger Configuration Variables (20)

PPT
HeroLympics Eng V03 Henk Vd Valk
PDF
Tuning Solr for Logs: Presented by Radu Gheorghe, Sematext
PPTX
CPN302 your-linux-ami-optimization-and-performance
PPTX
Технологии работы с дисковыми хранилищами и файловыми системами Windows Serve...
PDF
MongoDB World 2019: The Journey of Migration from Oracle to MongoDB at Rakuten
PDF
Aws meetup (sep 2015) exprimir cada centavo
PPT
z/VM Performance Analysis
PDF
Tweaking performance on high-load projects
PPT
Mirage: ML kernels in the cloud (ML Workshop 2010)
PPTX
MongoDB 101 & Beyond: Get Started in MongoDB 3.0, Preview 3.2 & Demo of Ops M...
PDF
HBaseCon 2015: Taming GC Pauses for Large Java Heap in HBase
ODP
Using ТРСС to study Firebird performance
PDF
A Front-Row Seat to Ticketmaster’s Use of MongoDB
PPTX
MongoDB World 2018: MongoDB for High Volume Time Series Data Streams
PDF
Speedrunning the Open Street Map osm2pgsql Loader
PDF
MongoDB .local Bengaluru 2019: The Journey of Migration from Oracle to MongoD...
PDF
Flink Forward Berlin 2017: Robert Metzger - Keep it going - How to reliably a...
PDF
High perf-networking
PPTX
Exascale Capabl
PDF
PostgreSQL performance archaeology
HeroLympics Eng V03 Henk Vd Valk
Tuning Solr for Logs: Presented by Radu Gheorghe, Sematext
CPN302 your-linux-ami-optimization-and-performance
Технологии работы с дисковыми хранилищами и файловыми системами Windows Serve...
MongoDB World 2019: The Journey of Migration from Oracle to MongoDB at Rakuten
Aws meetup (sep 2015) exprimir cada centavo
z/VM Performance Analysis
Tweaking performance on high-load projects
Mirage: ML kernels in the cloud (ML Workshop 2010)
MongoDB 101 & Beyond: Get Started in MongoDB 3.0, Preview 3.2 & Demo of Ops M...
HBaseCon 2015: Taming GC Pauses for Large Java Heap in HBase
Using ТРСС to study Firebird performance
A Front-Row Seat to Ticketmaster’s Use of MongoDB
MongoDB World 2018: MongoDB for High Volume Time Series Data Streams
Speedrunning the Open Street Map osm2pgsql Loader
MongoDB .local Bengaluru 2019: The Journey of Migration from Oracle to MongoD...
Flink Forward Berlin 2017: Robert Metzger - Keep it going - How to reliably a...
High perf-networking
Exascale Capabl
PostgreSQL performance archaeology

More from Antonios Giannopoulos (13)

PDF
Comparing Geospatial Implementation in MongoDB, Postgres, and Elastic
PDF
Using MongoDB with Kafka - Use Cases and Best Practices
PPTX
Sharding in MongoDB 4.2 #what_is_new
PPTX
New Indexing and Aggregation Pipeline Capabilities in MongoDB 4.2
PDF
Managing data and operation distribution in MongoDB
PDF
Upgrading to MongoDB 4.0 from older versions
PDF
How to upgrade to MongoDB 4.0 - Percona Europe 2018
PDF
Elastic 101 tutorial - Percona Europe 2018
PDF
Triggers in MongoDB
PPTX
Sharded cluster tutorial
PPTX
MongoDB – Sharded cluster tutorial - Percona Europe 2017
PDF
Percona Live 2017 ­- Sharded cluster tutorial
PPTX
How sitecore depends on mongo db for scalability and performance, and what it...
Comparing Geospatial Implementation in MongoDB, Postgres, and Elastic
Using MongoDB with Kafka - Use Cases and Best Practices
Sharding in MongoDB 4.2 #what_is_new
New Indexing and Aggregation Pipeline Capabilities in MongoDB 4.2
Managing data and operation distribution in MongoDB
Upgrading to MongoDB 4.0 from older versions
How to upgrade to MongoDB 4.0 - Percona Europe 2018
Elastic 101 tutorial - Percona Europe 2018
Triggers in MongoDB
Sharded cluster tutorial
MongoDB – Sharded cluster tutorial - Percona Europe 2017
Percona Live 2017 ­- Sharded cluster tutorial
How sitecore depends on mongo db for scalability and performance, and what it...

Antonios Giannopoulos Percona 2016 WiredTiger Configuration Variables