BSD and sysv are the most orthodox UNIX operating systems in the world. Before the advent of Linux, they ruled the entire Unix world. That's why these two most orthodox UNIX core genres have accumulated rich experience in practice.
Sysv tends to be commercial, and BSD prefers freedom and practicality.
Currently, this article only discusses FreeBSD, the most active release of the BSD genre. FreeBSD, as the most important BSD release, maintains the free and practical principles of BSD. However, many commercial functions are ignored. Based on my years of UNIX experience, I have listed some advantages and disadvantages of BSD. I hope this will serve as a reference for readers.
Disadvantages:
File System:
FreeBSD's file system belongs to the upper-level but does not meet enterprise-level application requirements. It is mainly reflected in the vulnerability of the file system. In the case of high load, the file system may crash. It should be noted that such a result may also be caused by the disk controller (SCSI, raid, etc.) driver itself. The absence of drivers from the original device is a big problem.
Network:
FreeBSD's network performance is useless! However, imperfect Nic drivers (yes, device drivers are a very important factor) may cause high performance and stability. Although this has nothing to do with FreeBSD's core, the driver is a very important component for a whole that can provide services.
In addition, the loose of a NIC interface may cause network interruption. Some commercial UNIX operating systems can transfer the IP addresses on the primary ENI to the NICS that provide correct connections when the primary ENI is unavailable.
Multi-processor (hyper-threading) support:
Prior to the publication of MySQL 6.0, FreeBSD was not quite compatible with multi-processor support. Intel CPU provides the HT (hyper-threading) function. FreeBSD is worse when HT is enabled than when it is disabled. I forgot the principle of hyper-threading. I only remember that the CPU with the hyper-threading function will have a lower performance in case of too many switches, but I forgot when to switch and what to switch. FreeBSD may have worse performance after enabling HT, which may be related to this issue.
Highlights:
Network:
FreeBSD has excellent network performance and can process massive network requests at the same time. This makes BSD very suitable for the firewall environment. In addition, FreeBSD is also a suitable choice for online chat servers, such as IM applications. Netease's Popo chat software server is developed and put into use in the actual environment under FreeBSD. By modifying the kernel, tens of thousands of user connections can be easily supported, is a permanent connection, unless the user clicks the Logout button.
Memory:
You will find that the memory on your server will be well utilized by FreeBSD to bring your service to the optimal state. FreeBSD does not allow the system to use swap because it uses too much memory for disk cache so that more important programs cannot obtain the physical memory. In the actual environment, I have encountered Linux to keep the disk cache and use swap for new tasks, resulting in a long execution time for new tasks. After swapoff-A is executed, it takes only half of the original time to run the same new task. The system has not stopped because of swap shutdown, indicating that the physical memory is not exhausted due to new tasks.
Example:
Memcached is an outstanding memory-based Cache Server. It can provide the serialized data storage function for the supported programming languages, so that the same data can be shared by multiple servers. More importantly, it is very fast.
I can use PHP or Java to obtain the data result set from the database, and then save the content of the result set to memcached, programs on other servers can also get the same copy of the corresponding key from memcached. In a distributed environment, this requirement is obvious. I also tried to set up a MySQL database when session data is saved to memcached instead of sharing session data.
When memcached is used as the data center, the network traffic will be very large, memory usage will be very frequent, basically not dealing with disks, and the robustness of the entire system is very demanding. FreeBSD naturally becomes the first choice for such applications. It provides efficient network performance, more reasonable memory utilization, and a sound system foundation.
I was influenced by this article, so I decided to install memcached and image server on FreeBSD!
For the original article, see "What Is FreeBSD? FreeBSD Advantages and Disadvantages Analysis