SlideShare a Scribd company logo
Firebird  Scalability Dmitry Yemanov [email_address]   The Firebird Project http://www.firebirdsql.org
Agenda Classic Server vs Super Server comparison, limits, solutions Memory usage page and sorting buffers CPU and concurrency multi-CPU and multi-core, TPC-C figures I/O specifics possible improvements Scaling up vs scaling out clustering possibilities A36 Dmitry Yemanov Slide
Architectural Differences Classic Server Process per connection, single-threaded Native scheduling Private caches Shared database file usage Shared lock table Super Server Single process, multi-threaded Cooperative scheduling Shared caches Exclusive database file usage In-process lock table A36 Dmitry Yemanov Slide
Classic Server: Limiting Factors Page cache Balance between available RAM and load Frequent modifications = extra page writes Lock manager bottlenecks Single mutex, LockAcquireSpins on SMP Lock access time, LockHashSlots LockMemSize: 100 * <connections> * <cache pages> Other limits Signal delivery (POSIX)‏ Desktop heap size (Windows)‏ A36 Dmitry Yemanov Slide
Super Server: Limiting Factors Page cache Total amount, 32-bit is not enough Many pages (old FB versions)‏ Cooperative thread scheduling One request active at a time Rescheduling points Other limits Socket pool limits (1024 on Windows)‏ Stack size (~1000 WNET/XNET connections)‏ A36 Dmitry Yemanov Slide
A Mixture of Both Key ideas behind Single process, multi-threaded Thread pooling Private caches per connection Communication via the lock manager In-process lock table Implementations Vulcan “No-Shared-Cache” mode RedSoft “SuperClassic” architecture Firebird “Transition” branch A36 Dmitry Yemanov Slide
Memory Usage Page cache Few pages = many I/O operations Many pages = possible problems in CS Remember about the metadata in CS Efficient implementation in SS Temporary space The bigger the better Should be used with care in CS Other Lock and event tables (shared memory)‏ A36 Dmitry Yemanov Slide
Page Cache Performance for Writers A36 Dmitry Yemanov Slide
CPU Scalability A36 Dmitry Yemanov Slide
Concurrency: TPC-C benchmark A36 Dmitry Yemanov Slide
I/O Specifics Tablespaces Data separated from indexes and blobs Separated user data (per schema)‏ Partitioning Active vs backup, by warehouse, etc Underlying improvements Asynchronous I/O Multi-page reads Cache prefetch A36 Dmitry Yemanov Slide
Scaling Up: Searching for the Best Setup Firebird 2.0 Classic on  Linux Use a 8K or 16K page size Find (experimentally) an optimal page cache size Calculate and set up LockMemSize accordingly Play with LockAcquireSpins and test the performance Consider FW=OFF with MaxUnflushedWrites = 1 Set up SortMemUpperLimit, if necessary Monitor the lock table and increase LockHashSlots A36 Dmitry Yemanov Slide
Scaling Out: Firebird Cluster A36 Dmitry Yemanov Slide  fb_inet_server fb_inet_server fb_inet_server fb_inet_server Lock Table Database
Scaling Out: Firebird Cluster A36 Dmitry Yemanov Slide  fb_inet_server fb_inet_server fb_inet_server fb_inet_server Distributed Lock Manager e.g. RedHat DLM Database LT LT LT LT
The Firebird Project www.firebirdsql.org   A36 Dmitry Yemanov Slide

More Related Content

PDF
Nano-node: Intelligent Hard Drives in Large Storage Infrastructures
ODP
Transparent Hugepages in RHEL 6
PPTX
Build2016 - P470 - Using Non-volatile Memory (NVDIMM-N) as Byte-Addressable S...
PDF
Optimize drupal
PPTX
In-Memory Computing: How, Why? and common Patterns
PDF
Accordion HBaseCon 2017
PDF
In-core compression: how to shrink your database size in several times
PPTX
IMC Summit 2016 Breakout - Andy Pavlo - What Non-Volatile Memory Means for th...
Nano-node: Intelligent Hard Drives in Large Storage Infrastructures
Transparent Hugepages in RHEL 6
Build2016 - P470 - Using Non-volatile Memory (NVDIMM-N) as Byte-Addressable S...
Optimize drupal
In-Memory Computing: How, Why? and common Patterns
Accordion HBaseCon 2017
In-core compression: how to shrink your database size in several times
IMC Summit 2016 Breakout - Andy Pavlo - What Non-Volatile Memory Means for th...

What's hot (20)

PPTX
[Paper Reading]KVSSD: Close integration of LSM trees and flash translation la...
PPTX
C* Summit EU 2013: Cassandra on Flash: Performance & Efficiency Lessons Learned
PDF
Nimble-Storage-AFA-Datasheet
PDF
Zararfa SummerCamp 2012 - Performing fast backups in large scale environments...
PPT
Hypertable Berlin Buzzwords
PDF
Hugepage
PDF
Redis - From LAMP to NoSQL (CloudTW meetup-14)
PDF
RAMinate Invited Talk at NII
PPTX
Page replacement
PDF
Indexes don't mean slow inserts.
PDF
PPT
Building scalable and reliable websites
ODP
PDF
Optimization_of_Virtual_Machines_for_High_Performance
PDF
Memory management in Linux kernel
PPTX
Project Presentation Final
ODP
PDF
RAMinate ACM SoCC 2016 Talk
PPTX
WiredTiger Overview
PPTX
mongoDB for sysadmins
[Paper Reading]KVSSD: Close integration of LSM trees and flash translation la...
C* Summit EU 2013: Cassandra on Flash: Performance & Efficiency Lessons Learned
Nimble-Storage-AFA-Datasheet
Zararfa SummerCamp 2012 - Performing fast backups in large scale environments...
Hypertable Berlin Buzzwords
Hugepage
Redis - From LAMP to NoSQL (CloudTW meetup-14)
RAMinate Invited Talk at NII
Page replacement
Indexes don't mean slow inserts.
Building scalable and reliable websites
Optimization_of_Virtual_Machines_for_High_Performance
Memory management in Linux kernel
Project Presentation Final
RAMinate ACM SoCC 2016 Talk
WiredTiger Overview
mongoDB for sysadmins
Ad

Viewers also liked (9)

PPTX
Resolving Firebird performance problems
PPTX
Fail-Safe Cluster for FirebirdSQL and something more
PDF
Global Netflix - HPTS Workshop - Scaling Cassandra benchmark to over 1M write...
PDF
Firebird migration: from Firebird 1.5 to Firebird 2.5
PPTX
FBScanner: IBSurgeon's tool to solve all types of performance problems with F...
PPTX
Firebird's Big Databases (in English)
PDF
AddThis: Scaling Cassandra up and down into containers with ZFS
PDF
Life with big Firebird databases
PPTX
High-load performance testing: Firebird 2.5, 3.0, 4.0
Resolving Firebird performance problems
Fail-Safe Cluster for FirebirdSQL and something more
Global Netflix - HPTS Workshop - Scaling Cassandra benchmark to over 1M write...
Firebird migration: from Firebird 1.5 to Firebird 2.5
FBScanner: IBSurgeon's tool to solve all types of performance problems with F...
Firebird's Big Databases (in English)
AddThis: Scaling Cassandra up and down into containers with ZFS
Life with big Firebird databases
High-load performance testing: Firebird 2.5, 3.0, 4.0
Ad

Similar to Firebird Scalability, by Dmitry Yemanov (in English) (20)

PDF
Tuning Linux for Databases.
PDF
Алексей Лесовский "Тюнинг Linux для баз данных. "
PPT
Ssd And Enteprise Storage
PPTX
Design Tradeoffs for SSD Performance
PPT
Ce202 Storage
PDF
SSD based storage tuning for databases
PDF
SOUG_SDM_OracleDB_V3
PDF
Database performance tuning for SSD based storage
PPTX
SSD для вашей базы данных, Петр Зайцев (Percona)
PPTX
IMCSummit 2016 Keynote - Benzi Galili - More Memory for In-Memory Easy
PPTX
CS 542 Putting it all together -- Storage Management
PDF
MySQL Oslayer performace optimization
PPT
Les 01 Arch
PPT
Real world capacity
DOC
notes2 memory_cpu
PPTX
PPT
Sql server performance tuning and optimization
PPTX
Building Data Pipelines with SMACK: Designing Storage Strategies for Scale an...
PDF
Database Hardware Benchmarking
PPT
Storage, San And Business Continuity Overview
Tuning Linux for Databases.
Алексей Лесовский "Тюнинг Linux для баз данных. "
Ssd And Enteprise Storage
Design Tradeoffs for SSD Performance
Ce202 Storage
SSD based storage tuning for databases
SOUG_SDM_OracleDB_V3
Database performance tuning for SSD based storage
SSD для вашей базы данных, Петр Зайцев (Percona)
IMCSummit 2016 Keynote - Benzi Galili - More Memory for In-Memory Easy
CS 542 Putting it all together -- Storage Management
MySQL Oslayer performace optimization
Les 01 Arch
Real world capacity
notes2 memory_cpu
Sql server performance tuning and optimization
Building Data Pipelines with SMACK: Designing Storage Strategies for Scale an...
Database Hardware Benchmarking
Storage, San And Business Continuity Overview

More from Alexey Kovyazin (20)

PPTX
Новые возможности языка SQL в Firebird 3.0
ODP
Firebird recovery tools and techniques by IBSurgeon
ODP
How Firebird transactions work
PDF
Professional tools for Firebird optimization and maintenance from IBSurgeon
PPTX
Firebird migration: from Firebird 1.5 to Firebird 2.5
PPTX
Firebird Anti-Corruption Approach
PDF
Firebird Dataguard (Russian)
PPT
Решения на базе СУБД Firebird в крупных компаниях и государственных учреждени...
PDF
Firebird DataGuard - Еще раз об уверенности в завтрашнем дне
PDF
Firebird usage promo draft
ODP
Firebird 2.5 - вектор дальнейшего развития, Dmitry Yemanov, (in Russian)
ODP
Understandung Firebird optimizer, by Dmitry Yemanov (in English)
PPTX
Firebird: cost-based optimization and statistics, by Dmitry Yemanov (in English)
ODP
СУБД Firebird: Краткий обзор, Дмитрий Еманов (in Russian)
ODP
Open Source: взгляд изнутри, Дмитрий Еманов (The Firebird Project) (in Russian)
ODP
Firebird 2.1 What's New by Vladislav Khorsun (English)
ODP
Firebird: Универсальная СУБД. Краткая презентация на Интероп 2008, Дмитрий Ем...
PPT
Firebird Roadmap-2006 Текущее состояние разработки и перспективы развития (in...
ODP
Firebird в 2008: новые возможности и планы по дальнейшему развитию, by Дмитри...
PPT
Firebird в 2008 году: эволюция или революция? (in Russian, by Dmitry Kuzmenko)
Новые возможности языка SQL в Firebird 3.0
Firebird recovery tools and techniques by IBSurgeon
How Firebird transactions work
Professional tools for Firebird optimization and maintenance from IBSurgeon
Firebird migration: from Firebird 1.5 to Firebird 2.5
Firebird Anti-Corruption Approach
Firebird Dataguard (Russian)
Решения на базе СУБД Firebird в крупных компаниях и государственных учреждени...
Firebird DataGuard - Еще раз об уверенности в завтрашнем дне
Firebird usage promo draft
Firebird 2.5 - вектор дальнейшего развития, Dmitry Yemanov, (in Russian)
Understandung Firebird optimizer, by Dmitry Yemanov (in English)
Firebird: cost-based optimization and statistics, by Dmitry Yemanov (in English)
СУБД Firebird: Краткий обзор, Дмитрий Еманов (in Russian)
Open Source: взгляд изнутри, Дмитрий Еманов (The Firebird Project) (in Russian)
Firebird 2.1 What's New by Vladislav Khorsun (English)
Firebird: Универсальная СУБД. Краткая презентация на Интероп 2008, Дмитрий Ем...
Firebird Roadmap-2006 Текущее состояние разработки и перспективы развития (in...
Firebird в 2008: новые возможности и планы по дальнейшему развитию, by Дмитри...
Firebird в 2008 году: эволюция или революция? (in Russian, by Dmitry Kuzmenko)

Recently uploaded (20)

PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Empathic Computing: Creating Shared Understanding
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
cuic standard and advanced reporting.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
Spectroscopy.pptx food analysis technology
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Encapsulation theory and applications.pdf
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Unlocking AI with Model Context Protocol (MCP)
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Assigned Numbers - 2025 - Bluetooth® Document
Spectral efficient network and resource selection model in 5G networks
Reach Out and Touch Someone: Haptics and Empathic Computing
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Empathic Computing: Creating Shared Understanding
Digital-Transformation-Roadmap-for-Companies.pptx
cuic standard and advanced reporting.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
MIND Revenue Release Quarter 2 2025 Press Release
Spectroscopy.pptx food analysis technology
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Encapsulation theory and applications.pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
20250228 LYD VKU AI Blended-Learning.pptx
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Unlocking AI with Model Context Protocol (MCP)
“AI and Expert System Decision Support & Business Intelligence Systems”
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...

Firebird Scalability, by Dmitry Yemanov (in English)

  • 1. Firebird Scalability Dmitry Yemanov [email_address] The Firebird Project http://www.firebirdsql.org
  • 2. Agenda Classic Server vs Super Server comparison, limits, solutions Memory usage page and sorting buffers CPU and concurrency multi-CPU and multi-core, TPC-C figures I/O specifics possible improvements Scaling up vs scaling out clustering possibilities A36 Dmitry Yemanov Slide
  • 3. Architectural Differences Classic Server Process per connection, single-threaded Native scheduling Private caches Shared database file usage Shared lock table Super Server Single process, multi-threaded Cooperative scheduling Shared caches Exclusive database file usage In-process lock table A36 Dmitry Yemanov Slide
  • 4. Classic Server: Limiting Factors Page cache Balance between available RAM and load Frequent modifications = extra page writes Lock manager bottlenecks Single mutex, LockAcquireSpins on SMP Lock access time, LockHashSlots LockMemSize: 100 * <connections> * <cache pages> Other limits Signal delivery (POSIX)‏ Desktop heap size (Windows)‏ A36 Dmitry Yemanov Slide
  • 5. Super Server: Limiting Factors Page cache Total amount, 32-bit is not enough Many pages (old FB versions)‏ Cooperative thread scheduling One request active at a time Rescheduling points Other limits Socket pool limits (1024 on Windows)‏ Stack size (~1000 WNET/XNET connections)‏ A36 Dmitry Yemanov Slide
  • 6. A Mixture of Both Key ideas behind Single process, multi-threaded Thread pooling Private caches per connection Communication via the lock manager In-process lock table Implementations Vulcan “No-Shared-Cache” mode RedSoft “SuperClassic” architecture Firebird “Transition” branch A36 Dmitry Yemanov Slide
  • 7. Memory Usage Page cache Few pages = many I/O operations Many pages = possible problems in CS Remember about the metadata in CS Efficient implementation in SS Temporary space The bigger the better Should be used with care in CS Other Lock and event tables (shared memory)‏ A36 Dmitry Yemanov Slide
  • 8. Page Cache Performance for Writers A36 Dmitry Yemanov Slide
  • 9. CPU Scalability A36 Dmitry Yemanov Slide
  • 10. Concurrency: TPC-C benchmark A36 Dmitry Yemanov Slide
  • 11. I/O Specifics Tablespaces Data separated from indexes and blobs Separated user data (per schema)‏ Partitioning Active vs backup, by warehouse, etc Underlying improvements Asynchronous I/O Multi-page reads Cache prefetch A36 Dmitry Yemanov Slide
  • 12. Scaling Up: Searching for the Best Setup Firebird 2.0 Classic on Linux Use a 8K or 16K page size Find (experimentally) an optimal page cache size Calculate and set up LockMemSize accordingly Play with LockAcquireSpins and test the performance Consider FW=OFF with MaxUnflushedWrites = 1 Set up SortMemUpperLimit, if necessary Monitor the lock table and increase LockHashSlots A36 Dmitry Yemanov Slide
  • 13. Scaling Out: Firebird Cluster A36 Dmitry Yemanov Slide fb_inet_server fb_inet_server fb_inet_server fb_inet_server Lock Table Database
  • 14. Scaling Out: Firebird Cluster A36 Dmitry Yemanov Slide fb_inet_server fb_inet_server fb_inet_server fb_inet_server Distributed Lock Manager e.g. RedHat DLM Database LT LT LT LT
  • 15. The Firebird Project www.firebirdsql.org A36 Dmitry Yemanov Slide