A database server (or DB server) is an important segment in the activity of any company, which should ensure an integrity, safety and availability of data 24/7. What kind of servers are these, what types of databases are there and what hardware is needed for them, read on.
A database server (or DB server) is an important segment in the activity of any company, which should ensure an integrity, safety and availability of data 24/7. What kind of servers are these, what types of databases are there and what hardware is needed for them, read on.
There are many different modern servers that improve database performance, but there are many types of databases, and what kind of server is needed for each type?
Database types
The most popular databases today are relational databases (SQL databases). Current information stores in a tabular format. The tables have a clear structure and link to each other. Each table divided into rows containing the individual records and columns with assigned data types. The information in each cell written according to the template.
SQL databases divided into several types:
- MySQL is an open source relational database designed for the small and medium-sized projects that is inexpensive and reliable. MySQL databases support a large number of tables with a lot of extensions and plugins that make it easier to work with the systems. They are easy to install and can be integrated into other databases with a suitable character for work in any CMS, for the frameworks and programming languages. They used by local or remote clients mainly, allowing work with the different types of tables that support full-text searches or perform the transactions at the level of individual records;
- PostgreSQL is the second most popular open source SQL database. It has a large number of built-in functions and add-ons, including scaling to a cluster and table sharding. It used to work with a complex data high requirements for their safety, since it is stable and practically does not “break”. It allows to work with a structured data, but it supports JSON/BSON with some flexibility in a data schema. PostgreSQL also designed to create, store and retrieve complex data structures. It supports variety the data types (among them - numeric, text, boolean, monetary, binary data, network addresses, xml and others);
- MSSQL is a multi-user software product developed by Microsoft with a high performance and a fault tolerance, tightly integrated with Windows OS. This server supports remote connections, works with a lot of popular data types. It provides the ability to create the triggers and a stored data with the practical and convenient configuration utilities. The query language of this DBMS based on Transact-SQL (jointly developed by Microsoft and Sybase). However, Transact-SQL is an implementation of the ANSI/ISO standard for SQL (Structured Query Language), but with some extensions. MSSQL widely used not only in the web projects, but also in the desktop programs. It used when there is a work with the relational databases of various sizes, ranging from personal databases to large enterprise-wide databases. It used in cases where the functionality of MySQL is not enough;
- Oracle Database is a multi-model object-relational DBMS commonly used for online transaction processing (OLTP), data warehousing (DW), and mixed database (OLTP and DW) database workloads. It includes tablespaces, control files, logs and archive logs, block change trace files, flashback logs, and backup (RMAN) files. Using this database, you can both automate common business operations and perform dynamic multidimensional data analysis (OLAP), perform operations with xml-format documents and manage separated and local information.
At the same time, despite the frank differences in functionality and architecture, all of the listed databases have similar hardware requirements.
How to choose a server for a database?
The specifics of the operation database servers is a data processing, as a rule, occurs transactionally. DBMS requests information in the small portions, performs the operations on it and then saves it. This specificity of work determines a number of requirements for server hardware:
- a large amount of RAM used to cache the most intensively used parts of a database;
- the disk subsystem should be characterized by high performance. The ability to process a large number of the small requests per unit of time - IOPS (input / output per second);
- high processing power is required to process queries and operations on data.
The choice of a server for a database also affects by the load on equipment and depends on a size the database files, on a number the users simultaneously connected to a server, on the intensity and characteristics of the user's work (input and editing, viewing, the formation of "heavy" queries), on a presence a resident software, on the nature the tasks executed by a server.
Database servers should meet hardware requirements depending on a number of the users:
- 10 users require a server with a processor speed of at least 2.2 GHz, at least two cores per processor, at least 4 GB of DDR3 RAM, at least 3 SAS / SATA drives with a rotation speed of 7200 rpm.;
- 20 users require a server with a processor speed of at least 2.3 GHz, at least four cores per processor, at least 6 GB of DDR3 RAM, at least 3 SAS / SATA drives with a rotation speed of 7200 rpm.;
- 50 users require a server with a processor speed of at least 2.5 GHz, at least eight cores per processor, at least 16 GB of DDR3 RAM, at least 6 SAS / SATA drives with a rotation speed of 7200 rpm.;
- 100 users require a server with two processors with a frequency of at least 2.8 GHz, at least ten cores per processor, at least 16 GB of DDR4 RAM, at least 10 SAS drives with a rotation speed of 10,000 rpm.;
- 200 users require a server with four processors with a frequency of at least 2.8 GHz, at least 8 cores per processor, at least 64 GB of DDR4 RAM, at least 16 SAS drives with a rotation speed of 10,000 rpm.;
- 500 users require a server with four processors with a processor frequency of at least 3 GHz, at least 16 cores per processor, at least 128 GB of DDR4 RAM, at least 24 SAS drives with a rotation speed of 10,000 rpm.
To ensure a fault-tolerant access to data it is worth organizing a cluster of the database servers using software designed for a specific DBMS and in compliance with all recommendations of its manufacturer.
Requirements for the server communication channels depend on the project’s specifics and on the expected number simultaneously working users. These indicators determined by the results of the load testing project.
For example, when there is a work with a typical project of 100 users at the same time, the required bandwidth of a database server channel is:
- minimum: 100 Mbps;
- recommended: 1 Gbps
The channel width is linearly dependent on a number of the users.
What to choose: SSD or HDD? Or maybe it will be NVMe?
One of the most important criteria for choosing a server for a database is the selection of a drive. Deciding which is better, a solid-state SSD or a hard HDD, is quite difficult.
HDDs currently used only as storage or in the systems where a speed of the disk subsystem isn’t particularly important. But even in such database servers it is preferable to place an operating system and the main applications on the solid-state drives in order to speed up a loading and launch of the applications.
Modern database servers most commonly use NAND SSDs with a high storage density, fast block erasing, and with a low power consumption. By the way, we already wrote in this article about a choosing an SSD.
The main advantage of SSDs over HDDs is that solid state drives significantly speed up a server performance. If a classic drive can read data at speeds up to 230 Mb / s, SSDs can read up to 700 Mb / s or more. The difference in writing time is also significant - SSDs record 500 Mb / s or more, and HDDs, at best, 90 Mb / s. If you need a quick solution the problems with a large load of equipment, then you should opt for an SSD.
Compare IOPS for the most popular SSDs.
In addition, SSDs differ from HDDs in read speed independence from file fragmentation, smaller dimensions and a weight (SSDs can be designed in much smaller cases than HDDs). However, SSDs have fewer write cycles than HDDs, and SSDs are more expensive.
The NVMe (Non-Volatile Memory Express) drive is also actively “stepping on the heels” of HDD drives. This standard developed to maximize the potential of flash memory technology. Modern PCI-based NVMe Gen3 drives boost server performance up to 5000MB/s, ten times the performance of SATA/SAS SSDs.
In fact, NVMe is the fastest of the existing ones. There are no limitations of the previous interfaces, any number of parallel accesses to the drive can be processed.
But a total transition from HDD and SSD of the SATA \ SAS standard to NVMe is not yet foreseen since hardware RAID arrays can only be assembled on the basis of hard and solid state drives, However, RAID should be built since the probability of disk failure is very high and downtime database server should be equal to zero. At least strive for it. Although it is worth noting that DELL has announced support for hardware RAID on NVMe drives in its latest generation of Gen15 servers. Alas, there are no tests and reviews at the time of writing.
And the cheapest SSD will not be faster?
The cost of SSD is higher compared to the hard drives. However, the saving on buying a solid state drive is not worth it.
If a buying the cheapest SSD can negate a performance of a server: the drives will no longer be able to cope with an increasing number of the writing operations, leading to delays in RAID arrays and to drive failure. The consumer SSD loaded with such a huge load, will go into Read Only mode. It will become impossible to write information to it.
Also, in server SSDs, the memory cells can be accessed through 8-16 channels, each of which can have from 16 to 64 subchannels. Client SSDs only have 2-4 channels with 4-8 sub-channels.
In addition, if you choose a client-class drive instead of an enterprise SSD, it will not be suitable for reading or writing under 24/7 load conditions. The load cycle of client SSDs built according to the 20/80 scheme (20% of the time in active work, 80% in standby or sleep mode).
When evaluating the suitability of an SSD for a database server, the IOPS, Latency, and DPWD values should be considered.
Our recommendations
We recommend using the multi-server database clusters for a fault tolerance. Reliable representatives of a fault tolerance are the manufacturers Hewlett Packard Enterprise and DELL. New servers cannot always be affordable, so we offer our customers to take a server in the secondary market, while in perfect condition and with a 2-year warranty.
Specialists of our company are ready to help you purchase the server and select the necessary server configuration for any required task.