How to improve the practical capabilities of Linux developers

Source: Internet
Author: User
Article Title: how to improve the practical capabilities of Linux developers. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
The 64-bit POWER architecture is recognized as a high-performance, reliable, and useful enterprise platform. It provides new options for UNIX and Linux application developers. No matter who you are, having experience using AIX or Linux on other platforms, you can benefit from the robust foundation of the open-source community that combines with the world's top IBM hardware POWER.
From affordable 2-way servers to vertically scalable supercomputer to the world's top JS20 BladeCenter, POWER-based machines have all sizes and levels, always ahead of people's expectations for enterprise-level hardware. Together with innovative configurations such as Dynamic Logical Partitioning, Linux or AIX provides a unique platform for application development and deployment that relies on the performance of the POWER Architecture. This article provides you with the tools and knowledge needed to construct most of the code and POWER platforms.
   Linux release
The wide range of options is a powerful feature of the Linux community. POWER Linux is mainly provided by Red Hat Linux and SUSE Linux. These two Linux release versions have their respective systems and have their own strengths. they all provide the complete toolchains, libraries, and development tools that Linux developers expect. This article commented respectively.
Note that TurboLinux is also supported. TurboLinux Enterprise Server8 uses the license code from SUSE Linux. Therefore, the features applicable to SUSE are also applicable to TurboLinux in the following discussion.
   Red Hat Enterprise Linux 3 (RHEL3)
Red Hat has successfully acted as a leader and pioneer in the open source community. In 2003, Red Hat Linux released the Enterprise Edition for POWER Architecture and brought about advanced Linux technology.
RHEL3 2.4.21 Linux kernel is optimized for the POWER Architecture. Even before the release of Linux 2.6, Red Hat has ported some 2.4 features in their Linux 2.6 kernel.
Among them, the most striking is the Native Posix Threads for Linux (NPTL) library. The previous Thread model, namely Linux Thread, is a traditional Thread model used in combination with the Linux 2.4 Scheduler. this model has been innovated for a period of time. In RHEL3, Red Hat transplanted the new thread model from the 2.5 development tree to the 2.4 kernel, which makes the scalability better and multithreading faster, the most obvious thing is that it fundamentally improves Java performance.
Unlike the m: n threads used in some commercial UNIX operating systems, NPTL is still a model, but no one doubts its performance. The new thread model can generate and destroy 450 threads in two seconds on the legacy 100,000 Mhz Intel processor, thus providing the performance required for enterprise-level Linux. Java applications generally run eight times faster than the old Linux thread model.
The combination of cutting-edge development is not limited to kernel thread models. RHEL3 also includes a new improved glibc version 2.3.1. Due to NPTL thread performance requirements, glibc 2.3.1 also introduced more efficient libraries for Linux applications.
SUSE SLES8 is the old one in two enterprise Linux versions and has reached the end of its lifecycle. SLES 8 features a regular 2.4 kernel update (SUSE has released three service packages for SLES8 users to ensure system security and performance that can be supplemented with updates ), it provides options for all categories. There are three types of file systems with logs available. By default, all common database, Web server, and email server applications and the latest KDE and Gnome desktop environments can be used in sles8. The 2.4.21 kernel currently available in SLES8 provides a 64-bit basis for real-time 32-bit and 64-bit applications.
The upcoming SLES9 is still being tested. The last task of SUSE is to integrate the new GCC, glibc, and Linux 2.6 kernels. After the release, SLES 9 will provide the first one available for IBM eServer? ISeries? And pSeries? The Linux 2.6 kernel of the server.
   Which release version is used?
Because the thread models provided by RHEL 3 and SLES8 are different, of course they cannot be considered to have full binary compatibility. The good news is that developers almost always find that the code compilation in different Linux releases is consistent, and the POWER version of Linux is no exception.
However, some applications are more sensitive to specific release versions during deployment. For example, the default Reiser file system on SLES8 is known for its high-performance processing of small files. Applications that perform read/write access to files smaller than 1 KB are suitable for using such a file system. it is best to run such programs on sles8, applications running Java threads will benefit from NPTL's RHEL3 implementation.
The advantage of the open source code model is its flexibility, and the POWER version of Linux is also flexible. That is to say, developers can find general references for development on RHEL3 and SLES8. Compilers, IBM Java Developer's Kit, and development tools such as the popular integrated development environment Eclipse are examples of free and available tools in these two release versions.
   Compilers and libraries
POWER Linux is a combination of two aspects: the best open source code development and enterprise-level hardware. It is best to provide an option for C, C ++, and Fortran compilers to reflect this combination.
   GNU Compiler Collection (GCC)
Gnu gcc is the most widely used compiler in Linux for all architectures. Red Hat and SUSE use this compiler to compile binary files (executable files) released with their products ). Since GCC 3.2 can generate 32-bit and 64-bit binary files, both RHEL3 and SLES8 provide GCC 3.2. RHEL3 uses a "biarch"-style dual compiler and uses a compiler flag (-m64) for 64-bit compilation.
SLES8 uses a 64-bit GCC tool chain, which is stored in/opt/cross by default. To enable the 64-bit compiler in SLES8, developers should ensure that their configuration scripts and Makefile FILES can recognize the compiler. You can complete this task by setting the CC environment variable to the position of the 64-bit GCC compiler.
At present, people are making major innovations in the GNU Compiler set to optimize the performance of the POWER Architecture. In the upcoming 3.3 and 3.4 releases, GCC scheduling and signal processing will be improved. In addition, optimization for specific architecture (such as VMX/Altivec support for PPC970 chip in IBM JS20 BladeCenter) will bring significant performance advantages to compiled code. However, both SLES8 and RHEL3 are currently using GCC 3.2. here we comment on the performance optimization of these versions.
GCC 3.2 does not optimize the specific architecture for the POWER Processor. Therefore, it is not recommended to use a tag for a specific architecture during compilation, such as-mpower. You can use these options, but it usually does not improve the performance. Unlike the GCC implementation on x86, The-fPIC mark is not included in GCC 3.2. To generate a binary file with dynamic links, you must include-fPIC in all Makefile FILES. This is especially important if you are porting a code library (codebase) from Linux on Intel because existing Makefile files may not explicitly use this tag.
Aside from identifying the tags that are not currently used by GCC for POWER Architecture, you should be aware of the tags available for x86 and POWER Architecture. These tags include compilation tags for relocation processing, table of contents size, floating point options, bit adjustment, and so on. For example, a large TOC supports multiple TOC entries (more than 8 K entries), which are specified by the-mminimal-toc compilation mark. To review these tags, read the standard GCC documentation in the source code package.
   IBM VisualAge compiler set
In addition to GCC, IBM also released a high-performance VisualAge compiler set, which can be used either RHEL3 or sles8. These compilers for C, C ++, and Fortran bring performance optimization technologies to their extreme; they are well-tailored to fully utilize the POWER Architecture. High Performance Computing developers often find that the Performance will increase by more than 30% if they use these compilers to recompile their code!
It is easy to use VisualAge for optimization. you only need to set the optimization level in advance, which corresponds to different types of algorithms. Generally, the use of simple-O3-qtune = auto and-qarch = auto will bring the most significant performance improvement. Level 3 Optimization automatically identifies the chip type and performs optimization unrelated to the chip (but not the architecture. Further use of the-O4 optimization tag can achieve higher performance, but the cost is Optimization for specific chips, inter-program analysis, and high-order conversion routines. High-performance code should first be optimized with-O3, and then try-O4. Although-O4 may improve performance, it is more picky about the code structure, and the binary compatibility on the POWER series microprocessor series is more limited.
To avoid incompatibility, the visual age compiler in POWER Linux is designed to use glibc included in each release package separately, and even use a local Linux linker. Applications eager for performance obviously require this unique feature of POWER Edition Linux.
There are a lot of documents about GCC and VisualAge compiler set optimization in POWER Linux. The reference documents list the free technical materials that all Linux developers of POWER Edition should put on the desktop.
   Ibm jdk 1.4.1
IBM has added development resources to the improvements to the customized JDK. the JDK for POWER Linux has both 32-bit and 64-bit. Both the BHEL3 and SLES8 installation packages contain ibm jdk 1.4.1, which can be used in combination with the Eclipse integrated development environment of POWER Linux.
   Development tools
Many Linux developers are willing to use traditional development tools, such as vi or Emacs. Naturally, these and common Linux kernel-level debugging tools such as gdb are available. However, in addition to these tools, POWER Edition Linux features support for development tools such as Eclipse IDE. The VisualAge compiler has detailed code analysis options to determine the character arrangement sequence (endianness) and 64-bit compatibility in the source code, the comfortable KDE and Gnome desktop environment gives developers who are used to graphic interfaces a great deal of freedom. High-performance computing (HPC) and Life Science developers will benefit from available general applications, such as the CLR application. IBM's advanced mathematical and scientific libraries ESSL and P/ESSL can also be used to assist high-performance applications on POWER Linux. With Globus Toolkit and other related solutions and Cluster system management (Cluster S)
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.