Skip to content

Massive buffer memory growth (>3 Gigabytes) of ntfs-3g leading to system swapping #181

@AlawamiAZ

Description

@AlawamiAZ

System:

Fedora 44
kernel 6.19.14

packages:

ntfs-3g.x86_64                    2:2022.10.3-12.fc44 fedora
ntfs-3g-libs.x86_64               2:2022.10.3-12.fc44 fedora
ntfs-3g-system-compression.x86_64 1.1-2.fc44          fedora
ntfsprogs.x86_64                  2:2022.10.3-12.fc44 fedora
fuse.x86_64           2.9.9-25.fc44 fedora
fuse-common.x86_64    3.18.2-1.fc44 updates-testing
fuse-overlayfs.x86_64 1.16-2.fc44   fedora
fuse3.x86_64          3.18.2-1.fc44 updates-testing
fuse3-libs.x86_64     3.18.2-1.fc44 updates-testing

Using ntfs-3g to run some games (eg Resident evil requiem) causes buffer memory to reach >3 gigabytes compared to just 5kilobytes in kernel ntfs3.
This causes the system (fedora 44) to swap out private memory of several apps just to keep the buffer in memory, for example running a game, 'resident evil requiem' private memory gets swapped heavily while playing on ntfs-3g, priv mem 5.5g -> 3.1g, swap 1.5g). Are ntfs-3g buffers invisible to the kernel that it keeps them in mem and swaps out other apps private memory?

Ntfs-3g:

$ vmstat -s
     16283740 K total memory
     10334096 K used memory
      3860992 K active memory
      9885452 K inactive memory
       309436 K free memory
      3132052 K buffer memory
      2601308 K swap cache
      8388604 K total swap
      1217528 K used swap
      7171076 K free swap
       537239 non-nice user cpu ticks
         6570 nice user cpu ticks
       230725 system cpu ticks
      9734363 idle cpu ticks
       107237 IO-wait cpu ticks
        61034 IRQ cpu ticks
         8175 softirq cpu ticks
            0 stolen cpu ticks
            0 non-nice guest cpu ticks
            0 nice guest cpu ticks
     30708999 K paged in
      7731853 K paged out
         6008 pages swapped in
       298708 pages swapped out
          512 pages alloc in dma
      6809085 pages alloc in dma32
            0 pages alloc in high
            0 pages alloc in movable
     77174524 pages alloc in normal
     87155597 pages free
    143007773 interrupts
    368426230 CPU context switches
   1778191282 boot time
        76417 forks

ntfs3: (mainline kernel driver):

$ vmstat -s
     16283740 K total memory
     11404192 K used memory
      7857932 K active memory
      6246516 K inactive memory
       275500 K free memory
         5768 K buffer memory
      4666452 K swap cache
      8388604 K total swap
            0 K used swap
      8388604 K free swap
       893252 non-nice user cpu ticks
         6633 nice user cpu ticks
       333365 system cpu ticks
     10745690 idle cpu ticks
       135492 IO-wait cpu ticks
        89518 IRQ cpu ticks
        10524 softirq cpu ticks
            0 stolen cpu ticks
            0 non-nice guest cpu ticks
            0 nice guest cpu ticks
     50215815 K paged in
      9956341 K paged out
       422230 pages swapped in
       748392 pages swapped out
          512 pages alloc in dma
      9836352 pages alloc in dma32
            0 pages alloc in high
            0 pages alloc in movable
    101768091 pages alloc in normal
    116490133 pages free
    202071557 interrupts
    567225222 CPU context switches
   1778191282 boot time
        84920 forks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions