The content of the article
Synology is a great solution for organizing a home or corporate NAS. The local operating system, DSM, is well thought out and highly optimized, but sometimes illogical and too stripped down. But what's great about DSM is that a lot can be fixed by editing the configuration files. And installing packages from a third-party repository from an independent developer community will significantly expand the functionality of the device in the direction not provided by the developers.
What exactly should be changed? The list includes a strange implementation of network port aggregation, which does not allow doubling the bandwidth when working with a single client, the lack of standard ways to increase the speed of the network interface, noisy operation of the fan at idle even in those models whose processor does not need active cooling.
Port aggregation: how to actually double the speed of a network interface
The speed of modern hard drives often exceeds 200 MB / s, and the use of some types of multi-disk arrays allows you to achieve higher speeds. The use of a single gigabit network port in network storages kills the fun in the bud: it is impossible to achieve speeds exceeding 125 bb / s with a single gigabit connection. In the article After Gigabit. Choosing and configuring equipment for a super-fast home network I already managed to complain about the problem, describing a solution option – buying and configuring a multi-gigabit adapter. Now I'm going to show you how to do without it and double the speed of your gigabit connection for free.
Several Synology models – such as DS718 +, DS220 +, DS720 +, DS420 + and more – are equipped with two or more Gigabit network ports. Qnap or Asustor users will shrug their shoulders: great, do the aggregation – the speed doubles! However, in the case of a Synology NAS, using an extra port to simply double the bandwidth is not an option for the average user. To understand the reasons, you need to talk a little about how network link aggregation works in principle.
You can use two or more network interfaces in different ways. You can select one link as a backup: it will be used only if the main link has problems. Aggregation can also be used to distribute the load by letting traffic generated by different clients on different links. In this case, the bandwidth increases in proportion to the number of links – but only if there are several users, and they access the data from different network interfaces. The data access speed for each specific user will not exceed the maximum speed of a single gigabit link.
The only exception to this rule is aggregation at the software level (it does not require any special switch or settings) using the Round Robin algorithm (sometimes translated into Russian as “cyclic” mode). When using this algorithm, network interfaces are used strictly in turn, which allows you to achieve the effect that an ordinary home user expects: the data transfer rate between the NAS and any other device (of course, also using a high-speed link) will be the sum of the total bandwidth of all aggregated links. Thus, the inclusion of a second Ethernet port from other manufacturers is a way to double the visible speed of the NAS to the user, bringing the speed of data exchange over the network very close to the speed of the disks themselves.
On the other hand, in Synology NASs, port aggregation will be of little use to the average user. For some reason, the DSM developers did not introduce the possibility of using the round robin mode in the graphical interface. Other algorithms? You are welcome! However, none of them will allow you to double the data transfer rate between the NAS and a single client. The vast majority of dual-port NAS buyers will not be aware of this feature until they try aggregation mode.
DSM provides a choice of one of the following aggregation algorithms:
At the same time, DSM works on top of a Linux assembly, in the kernel of which Round Robin aggregation is present, respectively, you can try to enable it. To do this, it is sufficient to change a single byte in a single text file. So:
- We create a network connection using aggregation using the Adaptive Load Balancing method. Attention: at the time of creating a connection, both network ports must already be connected to the switch, and the speed of the ports must match. By the way, I recommend increasing MTU to 9000 on the spot.
- We go through SSH as root and open the file
/etc/sysconfig/network-scripts/ifcfg-bond1(or bond0, depending on the settings) for editing.
- Find the line
BONDING_OPTSand replace the value "6" with "0". We save the file.
- Restart the network with the command
/etc/rc.network restart(If you then open the aggregation settings window in the DSM web interface, none of the options will be selected).
If done correctly, we will get double the data transfer rate between the NAS and … actually, between the NAS and any other device that either also uses Round Robin aggregation (tested on two Synology instances connected to the same gigabit switch), or with a device connected to the same switch over a high-speed channel at 2.5, 5 or 10 Gbps (tested with your own computer).
I think it is obvious that in this case, your computer should have either one high-speed network interface (connected to the high-speed port of a multi-gigabit switch), or two gigabit (you can connect to the same gigabit switch to which the NAS is connected).
Network port aggregation is a great thing with one small limitation: it only works on fairly expensive models in which the second network port is present as a class. Most of Synology's affordable models (including the extremely popular DS218 +, as well as the inexpensive DS118j and DS220j), alas, have a single network port. It is impossible to increase the access speed by standard means in any way – just switch to a more expensive model equipped with two Ethernet ports.
Let's try the obvious option: we plug the gigabit network adapter into a USB port in the hope of setting up aggregation. A double mistake: the adapter was not recognized by the system, we had to look for a driver; and even after installing it, the ability to configure aggregation in the system did not appear. The optional network interface has not been numbered (both built-in and USB ports) are shown in the interface called “LAN”. Well, no one promised that the DSM developers will leave the aggregation settings in the device with one port.
There remains another option: use an external network adapter with a speed of 2.5 or 5 Gbps. There are many options on sale, all of them are based on one of two chipsets: Marvell (Aquantia) AQtion AQC111U or Realtek RTL8156 (on which a dozen models are built that differ mainly in the shape of the case, and sometimes even only in the name of the manufacturer).
Option 1: 5 Gigabits, QNA-UC5G1T adapter based on AQtion AQC111U chipset
We are trying to connect a 5-Gigabit adapter from the main competitor of Synology – Qnap. Of course, just taking and connecting the adapter is not enough: DSM will correctly detect the device, but without a driver for the AQC111U it will not see the network link. Github comes to the rescue: drivers for the AQC111U chipset in package format for DSM can be downloaded from here…
Compatible models include DS918 +, DS620slim, DS1019 +, DS718 +, DS418play, and DS218 +. However, assemblies are available for older chipsets as well, but without a guarantee. At the same time, devices with Intel processors are mainly supported; models based on Realtek chips (ARMv8 architecture) are not supported, so the adapter cannot be used with DS218, DS218Play, DS220j or DS118j.
What about modern devices – DS220 +, DS720 +, DS420 + and so on? For them, the necessary libraries and frameworks that are necessary for compiling drivers have not yet been laid out.
Installing the driver is simple: just use the Manual Install command from the Packages section. After installation, the driver becomes available as an installed package; it will need to be started.
The driver is ready to work, but it is recommended to pre-configure it by changing MTU = 9000 in the adapter properties. In the settings, the adapter will look something like this:
This is not all. A 5-gigabit adapter is prone to heat, and where it gets hot, there is throttling. Accordingly, it is worth turning off temperature throttling, and in order to avoid overheating, turn on EEE (Energy Efficient Ethernet). This can be done with two commands in a terminal (assuming the connection ID is eth1, which is true for systems with only one built-in network port):
Continuation is available only to members
Materials from the latest issues become available separately only two months after publication. To continue reading, you must become a member of the "Xakep.ru" community.
Join the Xakep.ru community!
Membership in the community within the specified period will open you access to ALL Hacker's materials, increase your personal cumulative discount and allow you to accumulate a professional Xakep Score!
I am already a member of "Xakep.ru"