Chapter 8. Doing the Extra Work

So far, we have considered and talked about Zabbix running with all of its components (the Zabbix server, Zabbix GUI, and Zabbix database) in the same hardware. With all that we have seen in the previous chapters, we have managed to achieve very good performance levels and ensure monitoring of hundreds of devices with tens of thousands of items.

However, hardware is always a limitation on Zabbix. Sometimes, we don't have the authorization or money required to purchase more powerful hardware to deal with the increase in the number of hosts and monitored items. Also, thinking about growing by increasing the hardware isn't the best option.

Each major component of Zabbix (the server, GUI, and database) requires certain portions of the overall hardware. To avoid competition, they can be divided into distinct hardware components. Thereby, we can configure the operating system to perform more specific and not so generic tasks.

In this chapter, we talk about these topics:

  • Dividing the components
  • Specifying the hardware for each component
  • Partitioning tables

Dividing the components

Where we stand, we already understand the main adjustments required to ensure the best performance of Zabbix, but what should we do when all the suggested adjustments were made and performance is still a topic that causes headaches?

Luckily, Zabbix SIA envisaged Zabbix as a platform, and they allow us to target this platform and choose better hardware and OS configuration for each component. But when exactly is the time to think about having more than one piece of hardware to meet the demands of the environment? Is it when users complain that the GUI is slow? Is it when we have too many rows in the Zabbix server? Is it when I have too much IOWAIT in the operating system? Is it when the housekeeper takes a long time to run? Or when the database reaches a certain size? All of these? Any of these? Questions, questions and more questions!

In practice, a Zabbix environment can be born segmented if the environment's size can be planned from the beginning, but this is not always how it happens. Let's not forget that the environment we've been talking about since the beginning of this book is one that is born unpretentiously and acquires importance as it assists support teams or even the managers and directors.

In this precise scenario, you may wonder: do I need to set up a new segmented environment? Can I start from the current environment and separate only one component (the Zabbix server, GUI, or database) for some other hardware? Keep calm! Since the environment is running on a single item of hardware, it is simple enough to complete the transition. What we need to understand is which component to separate and what hardware to use.

There is no doubt that the component that requires more hardware is the Zabbix database, be it with MySQL, PostgreSQL, Oracle, or DB2. With this information, we know where the first signs that the current hardware needs support to perform the tasks required by Zabbix are. Of course, we always have some addition of alternative hardware resources (especially memory), but when that runs out, we have no choice but to opt for new hardware to support our Zabbix environment. This new hardware needs to have a very fast CPU and disks (RAID10, SSD, and so on).

Another recurring question and source of confusion is about the Zabbix server. Some users think that this is the component that requires more hardware, and tend to allocate more powerful hardware to it instead of the database. The Zabbix server will hardly be a motivator for new hardware, but we can't ignore the fact that Zabbix's caches and buffers need RAM to support the data flow control. So, a point to consider is the amount of memory allocated to the Zabbix server. The Zabbix server CPU is also something to consider, but hardly enough to deserve dedicated hardware. What about the disks? Well, the Zabbix server doesn't require much disks, so there is no need to think of a RAID10 or an SSD for this component.

What about the Zabbix GUI? Will it require new hardware just for itself? This depends on the number of online users and the number of screens, slides, maps, and graphics available in the environment. But yes, the Zabbix GUI can be one of the components that require separate hardware.

It is also important to properly understand the web server used (Apache, Nginx, lighttpd, and so on) and the alternative performance configurations. Each web server has its own characteristics and hardware requirements. Apache, for example, is the web server that has the highest memory use, so the Zabbix GUI with Apache and the Zabbix database are direct competitors in this regard.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset