LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Debian 10 vs Debian 8 performance (https://www.linuxquestions.org/questions/debian-26/debian-10-vs-debian-8-performance-4175688474/)

zctee 01-13-2021 03:02 AM

Debian 10 vs Debian 8 performance
 
2 Attachment(s)
Dear all,
Recently we are trying to update our system from Debian8 to Debian10, and then found out that the performance of the Debian10 seems like not as good as Debian 8.
For example, we tried to open mplayer at both Debian8 and Debian10. At Debian 8, it tooks around 1 second to open the player, but at Debian 10 it tooks around 4 seconds.
We done some debugging by strace at both OS. Found out that for Debian10, it seek and read the library files multiple time at the same location. Not sure why this is happening.
Attach the log from strace for both Debian8 and Debian10.

Is there any reason why Debian10 is behaving such way? Any way i can boost up the performance of the Debian10?

Thank you

ondoho 01-13-2021 01:38 PM

Quote:

Originally Posted by zctee (Post 6207224)
At Debian 8, it tooks around 1 second to open the player, but at Debian 10 it tooks around 4 seconds.

Only the first time, or every time?
Anyhow, mplayer has been superceded by mpv on modern distros.

zctee 01-13-2021 08:16 PM

Everytime when start run mplayer will takes 4 second.
Same thing happen to mpv as well. I see multiple read and lseek when load library

Thank you

andre@home 01-14-2021 02:06 AM

Generally newer version require somewhat faster CPU/RAM to obtain the same performance as the older distro you use....
Imho this is a normal consequence/behavior.
At a certain moment your hardware will even be too old to run the latest version of Debian.
Luckily nowadays new hardware is so fast that it will run many years with newer versions without any problem.
On older hardware I often switch to lighter Debian based distribution, like Bunsenlabs or MX-Linux.
They are supported very well as they rely on the Debian updates.

For a lot of common things (office, mail, surfing) that do not need advanced/the latest hardware, this work perfect.

zctee 01-14-2021 04:43 AM

I do understand that newer debian might run heavier as compared to older debian version. However, I am just confuse that why the strace shows so many read and seek same location. It seems not normal. I think this is something that can be avoided and get faster performance.
Thank you.

ondoho 01-15-2021 12:11 AM

Quote:

Originally Posted by zctee (Post 6207524)
Everytime when start run mplayer will takes 4 second.
Same thing happen to mpv as well. I see multiple read and lseek when load library

And this happens on the same piece of hardware?
I find it hard to believe that you have some ARM device that dual boots Debian 8 and 10. Please explain how you made the comparison.
Other factors might be playing into the effect you're seeing.

zctee 01-15-2021 01:39 AM

Hi Ondoho,
We do not do dual boot. Our machine boots on SD Card.
We do the comparison by using two different SD Cards.
The first SD Card runs on Debian 8.
The second SD Card is Debian 10. The second SD Card's Debian 10 is upgraded from the same image (Debian 8) of the first SD Card.

We do the comparison by inserting either one of the SD Card at a time to the same machine.

Thank you.

andre@home 01-15-2021 06:11 AM

SD cards may be bad for your speed.... SSD's, certainly small ones are new around 20 euros, so are so cheap why fizzle with SD cards?
Price impression: https://tweakers.net/solid-state-dri...iZwXmaekpVBLQA

And SD cards are quite unreliable with respect to so many write actions in time. It may shorten the life time of this SD card very much.

Now I understand your problem much better.... my advice: Avoid SD cards as much as possible for such a use.

heathcliff36 01-15-2021 06:39 AM

Quote:

Originally Posted by zctee (Post 6207887)
The second SD Card is Debian 10. The second SD Card's Debian 10 is upgraded from the same image (Debian 8) of the first SD Card.

So the Debian 10 OS is a dist-upgrade from an original Debian 8 install.

To get a fairer comparison of performance it may be better to have a new install of Debian 10 from the latest Debian 10 .iso file.

uteck 01-15-2021 09:24 AM

Quote:

Originally Posted by heathcliff36 (Post 6207946)
So the Debian 10 OS is a dist-upgrade from an original Debian 8 install.

To get a fairer comparison of performance it may be better to have a new install of Debian 10 from the latest Debian 10 .iso file.

I agree. I have seen some odd issues after a dist-upgrade causing very poor performance. I have also done dist-upgrades a number of times on servers with no noticeable impact, so it seems to be an inconsistent issue bet needs to be ruled out.

ondoho 01-15-2021 01:38 PM

^ Yeah, esp. how did you upgrade, from 8 to 9, and then from 9 to 10? No testing repos involved? Followed debian's own instructions?
Quote:

Originally Posted by zctee (Post 6207887)
Hi Ondoho,
We do not do dual boot. Our machine boots on SD Card.
We do the comparison by using two different SD Cards.
The first SD Card runs on Debian 8.
The second SD Card is Debian 10. The second SD Card's Debian 10 is upgraded from the same image (Debian 8) of the first SD Card.

We do the comparison by inserting either one of the SD Card at a time to the same machine.

Thank you.

OK.
I know not exactly what that small snip of an strace signifies.
All I see is mplayer is accessing some library libtinfo.so.5 on Deb8, and libtinfo.so.6 on Deb10.
Presumably when it's in the process of opening the same identical video file?
And on Deb10, that takes so much longer, like it's multiple accesses instead of just one?
...
I had a look under /lib:
Code:

ls -l libtinfo*
-rw-r--r-- 1 root root 24 Feb 13  2020 libtinfo.so
lrwxrwxrwx 1 root root 16 Feb 13  2020 libtinfo.so.6 -> libncursesw.so.6*

That's not Debian, but it makes me think that maybe if libtinfo.so.6 is a symlink, that results in 2 filesystem reads instead of 1?

Also, both files belong to ncurses.
mpv does not depend on ncurses, so your statement
Quote:

Originally Posted by zctee (Post 6207524)
Same thing happen to mpv as well

would appear to be incorrect.

shruggy 01-15-2021 02:33 PM

Quote:

Originally Posted by ondoho (Post 6208085)
All I see is mplayer is accessing some library libtinfo.so.5 on Deb8, and libtinfo.so.6 on Deb10.

What puzzles me is that on Debian 10 it's opened with the flag O_LARGEFILE. The sizes of the two versions of terminfo library are not so different (at least on AMD64 architecture).
Ubuntu 20.04:
Code:

$ ls -1hs /usr/lib/x86_64-linux-gnu/libtinfo.so.[56].*
180K /usr/lib/x86_64-linux-gnu/libtinfo.so.5.9
188K /usr/lib/x86_64-linux-gnu/libtinfo.so.6.2

Ubuntu 18.04 (it has only libtinfo5):
Code:

168K /lib/x86_64-linux-gnu/libtinfo.so.5.9
The 32-bit off_t should be enough to handle file sizes of this magnitude. Was mplayer on Debian 10 just compiled with -D_FILE_OFFSET_BITS=64?

ondoho 01-15-2021 02:39 PM

I remember reading somewhere that "mplayer code is a mess, carrying decades of cruft".

Maybe it's possible to call mplayer "without ncurses"? mpv has an option like that, sth like '--no-terminal-controls'.

zctee 01-17-2021 10:07 PM

Quote:

Originally Posted by andre@home (Post 6207937)
SD cards may be bad for your speed.... SSD's, certainly small ones are new around 20 euros, so are so cheap why fizzle with SD cards?
Price impression: https://tweakers.net/solid-state-dri...iZwXmaekpVBLQA

And SD cards are quite unreliable with respect to so many write actions in time. It may shorten the life time of this SD card very much.

Now I understand your problem much better.... my advice: Avoid SD cards as much as possible for such a use.

It's a legacy product which we cannot change the hardware design anymore. So we had to stick to SD Card.

zctee 01-17-2021 10:07 PM

Quote:

Originally Posted by heathcliff36 (Post 6207946)
So the Debian 10 OS is a dist-upgrade from an original Debian 8 install.

To get a fairer comparison of performance it may be better to have a new install of Debian 10 from the latest Debian 10 .iso file.

OK. I will try it out. Will let you guys know the result then


All times are GMT -5. The time now is 11:55 PM.