Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Massive slowdowns when handling many small files
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Jimini
l33t
l33t


Joined: 31 Oct 2006
Posts: 605
Location: Germany

PostPosted: Sat Nov 23, 2024 4:33 am    Post subject: Massive slowdowns when handling many small files Reply with quote

Dear all,

when handling many small files with gentoo-sources-6.1.*, everything works fine.
With gentoo-sources-6.6.*, the transfer gets slower after a while. A reboot helps for a few moments, until the performance problem occurs again. I have to add, that a normal reboot does not work then, since one of the processes cannot be stopped or killed. Thus, I have to hard reset the system, e.g. with a magic SysRQ.

It does not make any difference how the files are transferred - for testing purposes, I transfer the extracted kernel sources (/usr/src/linux/) from A to B:
- local rsync from SSD to HDD RAID6
- rsync from a NFS share to a local folder
- cp within the same RAID6
- rsync within the same RAID6
- extracting a tarball on the RAID6
For now, a file transfer within the same local SSD seems to work fine.

I have tested a few kernel versions, with the following results:
gentoo-sources-6.1.19 -> OK
gentoo-sources-6.1.28 -> OK
gentoo-sources-6.1.67 -> OK
gentoo-sources-6.6.13 -> problems
gentoo-sources-6.6.62 -> problems
(I did not configure and compile every new kernel from scratch. For new kernel versions, I reuse the old config and, after a "make syncconfig", I compile the new kernel.)

The CPU load looks fine, so does the memory consumption.I assume, that some I/O stuff may be the root cause here, but I honestly have no idea how to verify this.

Since I have a workaround by simply using an older kernel, it does not look like a hardware (memory, CPU, RAID6) problem to me.

I would be thankful for any input for further testing.

Kind regards
Jimini
_________________
"The most merciful thing in the world, I think, is the inability of the human mind to correlate all its contents." (H.P. Lovecraft: The Call of Cthulhu)
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5144
Location: Bavaria

PostPosted: Sat Nov 23, 2024 9:26 am    Post subject: Re: Massive slowdowns when handling many small files Reply with quote

Jimini wrote:
[...](I did not configure and compile every new kernel from scratch. For new kernel versions, I reuse the old config and, after a "make syncconfig", I compile the new kernel.) [...]

Dont use "make syncconfig" ... use "make oldconfig". See also:
https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Manual_kernel_configuration#What_is_.22make_oldconfig.22_.3F
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
pingtoo
Veteran
Veteran


Joined: 10 Sep 2021
Posts: 1268
Location: Richmond Hill, Canada

PostPosted: Sat Nov 23, 2024 2:55 pm    Post subject: Reply with quote

So is only destination RAID6 show this symptom? does reverse destination to SSD show same symptom?

It is worthy to know it is write bound or read bound.
Back to top
View user's profile Send private message
wjb
l33t
l33t


Joined: 10 Jul 2005
Posts: 632
Location: Fife, Scotland

PostPosted: Sat Nov 23, 2024 5:15 pm    Post subject: Reply with quote

Code:
$ grep -a3 syncconfig /usr/src/linux/scripts/kconfig/Makefile
...
#
# Note:
#  syncconfig has become an internal implementation detail and is now
#  deprecated for external use
Back to top
View user's profile Send private message
Jimini
l33t
l33t


Joined: 31 Oct 2006
Posts: 605
Location: Germany

PostPosted: Sun Nov 24, 2024 2:58 am    Post subject: Reply with quote

pietinger, pingtoo & wjb, thank you for your replies.

Regarding syncconfig, it seems like I did not get the memo ;)
I have adapted my scripts and rebuilt the kernel on this particular machine, thank you.

I ran a few tests:
- unpacking a tarball on the SSD took 1m43s
- unpacking the same tarball on the RAID6 was canceled by me after there was no progress for 75min
- unpacking the same tarball from the RAID6 to the SSD took 1min10s
- unpacking the same tarball from the SSD to the RAID6 was canceled by me after 38mins

Writing to the RAID6 seems to lead to problems.
This is not the case in general - I can copy a 25G file to the RAID6, which takes about 7min (about 60MB/s).

In addition, I had a look at the processes on the system, while I was trying to reboot. "kworker/u8:0+flush-253:0" was at about 100% CPU load.

Maybe I should add share some information on my setup:
- Intel Core i3-9100 CPU @ 3.60GHz, 4 GB memory
- software RAID6, consisting of 7 HDDs (Seagate Exos X16, Toshiba MG08ACA16TE)
- on it is a LUKS2 container with aes-xts-plain64 as cipher
- ext4 is the filesystem:
dumpe2fs 1.47.1 (20-May-2024)
Filesystem volume name: <none>
Last mounted on: /home/share
Filesystem UUID: 94c5bf33-25cb-4eb0-9081-6e638dfabe67
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: has_journal ext_attr dir_index filetype needs_recovery extent 64bit flex_bg sparse_super large_file huge_file dir_nlink extra_isize metadata_csum
Filesystem flags: signed_directory_hash
Default mount options: user_xattr acl
Filesystem state: clean
[...]

Please bear in mind that with gentoo-sources-6.1.*, it works without problems :)
Any idea what I could test yet?

Kind regards
Jimini
_________________
"The most merciful thing in the world, I think, is the inability of the human mind to correlate all its contents." (H.P. Lovecraft: The Call of Cthulhu)
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5144
Location: Bavaria

PostPosted: Sun Nov 24, 2024 11:21 am    Post subject: Reply with quote

I could take a look at your kernel configuration ... preferably together with all three data mentioned here:
https://wiki.gentoo.org/wiki/User:Pietinger/Overview_of_System_Information
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
Jimini
l33t
l33t


Joined: 31 Oct 2006
Posts: 605
Location: Germany

PostPosted: Sun Nov 24, 2024 11:52 am    Post subject: Reply with quote

pietinger, thanks a lot for your offer.

Here you are:
emerge --info: https://paste.gentoo.zip/BhPUxQ13
dmesg: https://paste.gentoo.zip/0e1IKBml
lspci -nnk: https://paste.gentoo.zip/fZ9hw8oR (the command throws "lspci: Unable to load libkmod resources: error -2", but I guess this should not be the root cause for my problem)
kernel config: https://paste.gentoo.zip/q2mJlIVk

Again, I just tried to unpack the kernel files right on the RAID6, just for having a look at the dmesg output. But the only new line is the following:
[ 525.705770] EXT4-fs (dm-0): mounted filesystem 94c5bf33-25cb-4eb0-9081-6e638dfabe67 r/w with ordered data mode. Quota mode: none.


From today on, I will be on a trip until next sunday, so I will not be able to respond until then. So please take your time for having a look into the shared information.

Best regards and thanks in advance
Jimini
_________________
"The most merciful thing in the world, I think, is the inability of the human mind to correlate all its contents." (H.P. Lovecraft: The Call of Cthulhu)
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5144
Location: Bavaria

PostPosted: Sun Nov 24, 2024 5:24 pm    Post subject: Reply with quote

Jimini,

you have as profile selected: default/linux/amd64/23.0/split-usr/no-multilib/hardened
... but you dont have a hardened kernel, you know that?

Your dmesg is not complete: I am missing the beginning; it starts at timestamp [ 1.477459]

I see you have not much RAM: 3.685.320 byte

It is an (old) Intel machine: Intel-R-_Core-TM-_i3-9100 and CONFIG_MCORE2=y

You have disabled module support (like me) and get the harmless error from lspci (I also have) because the package sys-apps/pciutils (which contains lspci) was emerged with Use-flag "kmod". If you want to get rid of the error message, you have to switch off this use flag for this package (but as I said, this is absolutely harmless).

I am missing some important options in your kernel, e.g. CONFIG_X86_X2APIC=y because you miss CONFIG_IRQ_REMAP ... because you switched it off completely:
Code:
# CONFIG_INTEL_IOMMU is not set

(see more here: https://wiki.gentoo.org/wiki/User:Pietinger/Experimental/Manual_Configuring_Current_Kernel#IOMMU )

Maybe you will need also:
Code:
# CONFIG_X86_INTEL_LPSS is not set
... AND one of them:
# CONFIG_LPC_ICH is not set
# CONFIG_LPC_SCH is not set
# CONFIG_MFD_INTEL_LPSS_ACPI is not set
# CONFIG_MFD_INTEL_LPSS_PCI is not set

(see more here: https://wiki.gentoo.org/wiki/User:Pietinger/Experimental/Manual_Configuring_Current_Kernel#Platform_support )

I always recommend to boot with our Gentoo LiveCD and do a "lsmod" and notice all loaded modules. Maybe you see then:
Code:
# CONFIG_INTEL_IDMA64 is not set

is loaded instead of
Code:
CONFIG_INTEL_IOATDMA=y


Some additional notes:
Code:
1.
CONFIG_PREEMPT_NONE=y
2.
# CONFIG_SCHED_CORE is not set
3.
CONFIG_TRACEPOINTS=y
4.
# CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS is not set
3.
CONFIG_PM_DEBUG=y
CONFIG_PM_ADVANCED_DEBUG=y
5.
# CONFIG_ACPI_PROCESSOR_AGGREGATOR is not set
6.
# CONFIG_INTEL_IDLE is not set
7.
CONFIG_IA32_EMULATION=y
8.
CONFIG_BLK_DEV_THROTTLING=y
3.
CONFIG_BLK_DEBUG_FS=y
9.
CONFIG_EXTRA_FIRMWARE=""
10.
CONFIG_I2C_ALI1535=y
CONFIG_I2C_ALI1563=y
CONFIG_I2C_ALI15X3=y
CONFIG_I2C_AMD756=y
CONFIG_I2C_AMD756_S4882=y
CONFIG_I2C_AMD8111=y
CONFIG_I2C_I801=y
CONFIG_I2C_PIIX4=y
CONFIG_I2C_NFORCE2=y
CONFIG_I2C_SIS5595=y
CONFIG_I2C_SIS630=y
CONFIG_I2C_SIS96X=y
CONFIG_I2C_VIA=y
CONFIG_I2C_VIAPRO=y

CONFIG_I2C_OCORES=y
CONFIG_I2C_SIMTEC=y
CONFIG_I2C_TAOS_EVM=y
CONFIG_I2C_TINY_USB=y

# CONFIG_PINCTRL is not set
11.
CONFIG_SECURITY_SELINUX=y
CONFIG_INTEGRITY=y
3.
CONFIG_DEBUG_FS=y
CONFIG_DEBUG_FS_ALLOW_ALL=y
CONFIG_BLK_DEV_IO_TRACE=y

1. Tells me it was configured as server machine - Okay.
2. I recommend to enable it
3. Every debugging and tracing cost performance. I always recommend to switch it off (and use it only when investigating a specific problem)
4. Maybe you need it (the default value is: enabled)
5. I recommend to enable it
6. I recommend to enable it
7. You have a No-multilib system (like me) and can/should disable it
8. Really ? I would disable it.
9. I see you are using an initramfs (probably even built by yourself) - are you sure that the microcode and all firmware files are included? If not, include them in your kernel directly (https://wiki.gentoo.org/wiki/User:Pietinger/Experimental/Manual_Configuring_Current_Kernel#CPU_Microcode ).
10. I think you will need only CONFIG_I2C_I801=y ... if at all ... because i2c requires pinctrl, which you have not activated. Do you have i2c hardware in this machine?
11. If you dont use it ... disable it.
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum