Re: more of a linux question

From: Mladen Gogala <gogala.mladen_at_gmail.com>
Date: Fri, 13 Oct 2023 19:53:29 -0400
Message-ID: <2fdca340-f201-4638-be12-bf7218be11e4_at_gmail.com>



On 10/12/23 06:35, Laurentiu Oprea wrote:
> Dear all,
>
> I`m having a linux question, I know it is not the right place but I
> know for sure we have some linux gurus around.
>
> I`m trying to figure out why a simple bash loop like (pseudocode)  :
> while i < n do i=i+1 end  for similar hardware is running in 30
> seconds on RHEL7 servers but in 75 on RHEL6.
>
> I did a perf tracing on each process and I can observe
> that sigprocmask function call is accountable for around 20% of time
> in RHEL6 while in RHEL7 is not even present.
>
> THere are couple of other functions not present in RHEL7 but only in
> RHEL6 like: strcpy_ssse3 (3% of time) , and some functions which runs
> 3 times faster on RHEL7 like mbrtowc 9.5% in RHEL6  vs 3.5% in RHEL7
>
> DO you guys think it is a matter of just a newer / faster kernel?
> maybe other libraries involved like glibc?
>
> Appreciate your feedback.
>
Well, sigprocmask is a function which examines which signals are blocked from delivery, It should work on the process header and complete relatively quickly:

NAME
        sigprocmask, rt_sigprocmask - examine and change blocked signals

LIBRARY
        Standard C library (libc, -lc)

SYNOPSIS
        #include <signal.h>

        /* Prototype for the glibc wrapper function */
        int sigprocmask(int how, const sigset_t *_Nullable restrict set,
                                   sigset_t *_Nullable restrict oldset);

        #include <signal.h>           /* Definition of SIG_* constants */
        #include <sys/syscall.h>      /* Definition of SYS_* constants */         #include <unistd.h>
        /* Prototype for the underlying system call */
        int syscall(SYS_rt_sigprocmask, int how,
                                   const kernel_sigset_t *_Nullable set,
                                   kernel_sigset_t *_Nullable oldset,
                                   size_t sigsetsize);

Other than that, I too have noticed increased speed on RHEL8, as opposed to RHEL7. I believe that we are seeing improved algorithms in newer kernels, Some of it is advertised, like here:

https://www.zdnet.com/article/linux-6-0-arrives-with-performance-improvements-and-more-rust-coming/

Also, newer kernels have drivers for NVME devices, which were not available in RHEL6. Furthermore, one of the standard performance tuning advices is "update your kernel":

https://kernelgrok.com/optimizing-the-linux-kernel-tips-to-improve-performance/

In other words, I kind of expect newer versions of Linux to be better than the old versions of Linux.

-- 
Mladen Gogala
Database Consultant
Tel: (347) 321-1217
https://dbwhisperer.wordpress.com

--
http://www.freelists.org/webpage/oracle-l
Received on Sat Oct 14 2023 - 01:53:29 CEST

Original text of this message