ntfs-3g uses TOO MUCH ressources on one of my ntfs partitions

Hi!
I am using Manjaro from about six months. My desktop is XFCE4. Lately I have had a problem with ntfs-3g. I have two ntfs partitions: the first is installed on my internal SSD -- where I have the OS -- that I use like a storage partition for documents etc., and the other on a external SSD that I use like a backup partition of the first. For the second partition I haven't problems. Contrariwise, in many cases the first one use too much ressources (for example, if I launch it automatically at startup via fstab or if I launch some program like Chromium Snapshot). The system freezes for many minutes and I am obliged to kill the ntfs-3g program opening an other console. In this case, the partition is unmounted and I can't remount it during my session. I have reformatted the internal ntfs partition and I have copied my data from the ntfs mirror partition, but the problem persists. I have also remplaced the "official" ntfs-3g by the AUR version, but nothing has changed. If I don't find a solution, I will be obliged to change my OS.
Some suggestion?

From fstab:

UUID=0acc8b8f-0135-4366-ac5a-27a0daa3930a /              ext4    defaults,noatime,discard 0 1
UUID=2faa9e68-9a67-42a8-b7a9-f193616621c4 swap           swap    defaults,noatime,discard 0 2
UUID=73fe2a80-24de-4c60-92eb-034ea3085908 swap           swap    defaults,noatime 0 2
tmpfs                                     /tmp           tmpfs   defaults,noatime,mode=1777 0 0
#/dev/sda6
#UUID=0D92146E0D92146E /run/media/root/STORAGE ntfs  uid=root,gid=users,umask=0022    0 0
#/dev/sdb3
UUID=01D40CC216DA21D0 /run/media/root/RESERVOIR ntfs   uid=root,gid=users,umask=0022   0 0
 
$ inxi -Fx 
System:    Host: compx-pc Kernel: 4.19.56-1-MANJARO x86_64 bits: 64 compiler: gcc v: 9.1.0 
           Desktop: Xfce 4.13.5 Distro: Manjaro Linux 
Machine:   Type: Laptop System: TOSHIBA product: Satellite L550 v: PSLWSE-002008FR 
           serial: 1A015075K 
           Mobo: TOSHIBA model: NTWAA v: 1.00 serial: 123456789AB UEFI [Legacy]: TOSHIBA 
           v: 2.20 date: 01/21/11 
Battery:   ID-1: BAT1 charge: 52.3 Wh condition: 52.3/47.5 Wh (110%) 
           model: COMPAL PA3534U-1BRS status: Unknown 
CPU:       Topology: Dual Core model: Intel Core i5 M 430 bits: 64 type: MT MCP arch: Nehalem 
           rev: 2 L2 cache: 3072 KiB 
           flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 18099 
           Speed: 1403 MHz min/max: 1199/2266 MHz Core speeds (MHz): 1: 1893 2: 1540 3: 1865 
           4: 1815 
Graphics:  Device-1: AMD RV730/M96 [Mobility Radeon HD 4650/5165] 
           vendor: Toshiba America Info Systems driver: radeon v: kernel bus ID: 01:00.0 
           Display: tty server: X.Org 1.20.5 driver: ati,radeon unloaded: modesetting 
           resolution: 1600x900~60Hz 
           OpenGL: renderer: AMD RV730 (DRM 2.50.0 / 4.19.56-1-MANJARO LLVM 8.0.0) 
           v: 3.3 Mesa 19.1.1 direct render: Yes 
Audio:     Device-1: Intel 5 Series/3400 Series High Definition Audio 
           vendor: Toshiba America Info Systems driver: snd_hda_intel v: kernel 
           bus ID: 00:1b.0 
           Device-2: AMD RV710/730 HDMI Audio [Radeon HD 4000 series] 
           vendor: Toshiba America Info Systems driver: snd_hda_intel v: kernel 
           bus ID: 01:00.1 
           Sound Server: ALSA v: k4.19.56-1-MANJARO 
Network:   Device-1: Realtek RTL8191SEvB Wireless LAN driver: rtl8192se v: kernel port: 7000 
           bus ID: 07:00.0 
           IF: wlp7s0 state: up mac: 70:1a:04:c1:81:ef 
           Device-2: Realtek RTL810xE PCI Express Fast Ethernet 
           vendor: Toshiba America Info Systems driver: r8169 v: kernel port: 5000 
           bus ID: 0c:00.0 
           IF: enp12s0 state: down mac: 00:26:22:fa:c2:58 
Drives:    Local Storage: total: 344.68 GiB used: 121.19 GiB (35.2%) 
           ID-1: /dev/sda vendor: Samsung model: SSD 850 EVO 250GB size: 232.89 GiB 
           ID-2: /dev/sdc type: USB model: SABRENT SABRENT size: 111.79 GiB 
Partition: ID-1: / size: 57.84 GiB used: 27.24 GiB (47.1%) fs: ext4 dev: /dev/sda2 
           ID-2: swap-1 size: 6.00 GiB used: 320.2 MiB (5.2%) fs: swap dev: /dev/sda5 
           ID-3: swap-2 size: 1024.0 MiB used: 0 KiB (0.0%) fs: swap 
           dev: /dev/sdb2\040(deleted) 
Sensors:   System Temperatures: cpu: 50.0 C mobo: N/A 
           Fan Speeds (RPM): N/A 
Info:      Processes: 212 Uptime: 1d 12h 08m Memory: 3.72 GiB used: 1.35 GiB (36.2%) 
           Init: systemd Compilers: gcc: 9.1.0 Shell: fish v: 3.0.2 inxi: 3.0.34

Are you dual-booting with Windows or sharing documents over a network with another machine running Windows? If not, why do you need to use NTFS at all?

Yes, I am dual-booting with Windows. For this I use a ntfs partition.

FYI only, use </> or three backticks around pasted text.

UUID=0acc8b8f-0135-4366-ac5a-27a0daa3930a / ext4 defaults,noatime,discard 0 1
UUID=2faa9e68-9a67-42a8-b7a9-f193616621c4 swap swap defaults,noatime,discard 0 2
UUID=73fe2a80-24de-4c60-92eb-034ea3085908 swap swap defaults,noatime 0 2
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
#/dev/sda6
#UUID=0D92146E0D92146E /run/media/root/STORAGE ntfs uid=root,gid=users,umask=0022 0 0
#/dev/sdb3
UUID=01D40CC216DA21D0 /run/media/root/RESERVOIR ntfs uid=root,gid=users,umask=0022 0 0
$ inxi -Fx
System: Host: compx-pc Kernel: 4.19.56-1-MANJARO x86_64 bits: 64 compiler: gcc v: 9.1.0
Desktop: Xfce 4.13.5 Distro: Manjaro Linux
Machine: Type: Laptop System: TOSHIBA product: Satellite L550 v: PSLWSE-002008FR
serial: 1A015075K
Mobo: TOSHIBA model: NTWAA v: 1.00 serial: 123456789AB UEFI [Legacy]: TOSHIBA
v: 2.20 date: 01/21/11
Battery: ID-1: BAT1 charge: 52.3 Wh condition: 52.3/47.5 Wh (110%)
model: COMPAL PA3534U-1BRS status: Unknown
CPU: Topology: Dual Core model: Intel Core i5 M 430 bits: 64 type: MT MCP arch: Nehalem
rev: 2 L2 cache: 3072 KiB
flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 18099
Speed: 1403 MHz min/max: 1199/2266 MHz Core speeds (MHz): 1: 1893 2: 1540 3: 1865
4: 1815
Graphics: Device-1: AMD RV730/M96 [Mobility Radeon HD 4650/5165]
vendor: Toshiba America Info Systems driver: radeon v: kernel bus ID: 01:00.0
Display: tty server: X.Org 1.20.5 driver: ati,radeon unloaded: modesetting
resolution: 1600x900~60Hz
OpenGL: renderer: AMD RV730 (DRM 2.50.0 / 4.19.56-1-MANJARO LLVM 8.0.0)
v: 3.3 Mesa 19.1.1 direct render: Yes
Audio: Device-1: Intel 5 Series/3400 Series High Definition Audio
vendor: Toshiba America Info Systems driver: snd_hda_intel v: kernel
bus ID: 00:1b.0
Device-2: AMD RV710/730 HDMI Audio [Radeon HD 4000 series]
vendor: Toshiba America Info Systems driver: snd_hda_intel v: kernel
bus ID: 01:00.1
Sound Server: ALSA v: k4.19.56-1-MANJARO
Network: Device-1: Realtek RTL8191SEvB Wireless LAN driver: rtl8192se v: kernel port: 7000
bus ID: 07:00.0
IF: wlp7s0 state: up mac: 70:1a:04:c1:81:ef
Device-2: Realtek RTL810xE PCI Express Fast Ethernet
vendor: Toshiba America Info Systems driver: r8169 v: kernel port: 5000
bus ID: 0c:00.0
IF: enp12s0 state: down mac: 00:26:22:fa:c2:58
Drives: Local Storage: total: 344.68 GiB used: 121.19 GiB (35.2%)
ID-1: /dev/sda vendor: Samsung model: SSD 850 EVO 250GB size: 232.89 GiB
ID-2: /dev/sdc type: USB model: SABRENT SABRENT size: 111.79 GiB
Partition: ID-1: / size: 57.84 GiB used: 27.24 GiB (47.1%) fs: ext4 dev: /dev/sda2
ID-2: swap-1 size: 6.00 GiB used: 320.2 MiB (5.2%) fs: swap dev: /dev/sda5
ID-3: swap-2 size: 1024.0 MiB used: 0 KiB (0.0%) fs: swap
dev: /dev/sdb2\040(deleted)
Sensors: System Temperatures: cpu: 50.0 C mobo: N/A
Fan Speeds (RPM): N/A
Info: Processes: 212 Uptime: 1d 12h 08m Memory: 3.72 GiB used: 1.35 GiB (36.2%)
Init: systemd Compilers: gcc: 9.1.0 Shell: fish v: 3.0.2 inxi: 3.0.34

What do you mean with this? What resources?

What does Chromium have to do with the partition in question?

Why have you chosen this mount point and uid value (root? )?
Please do some search in the forum about "fstab mount ntfs-3g folders". There were countless similar cases with several examples on how to share data folders.
If you are still stuck, post what you have tried and failed.

1 Like

When was the last time you trimmed this partition in windows? The linux ntfs-3g drivers do not have trim support. So this is not a good drive setup for a ssd.

Excuse me for my tardy response. I thought that the notification function was enabled, but my browser inihibits it.

OK. Now I know. Is there a TECHNICAL tutorial to post in the forum?

I mean that the CPU activity mounts up to 100 %.

It’s a very good question, but I don’t know. I thought that the problem came from the last page saved by Chromium in the ntfs directory of my internal hard drive, but I tried to save a new page in my /home (ext4), and the problem persists.

What is the «best» mount point? If I remember well, in Archlinux I have used this mount point without problem. About the uid, I log in as root. I know that this it isn’t the safest way, but if it was the cause of the problem, for which reason my ntfs partition on my external SSD runs well when I log in as root?

Before to post in this forum I tried it. I have found many threads and responses at this subject, above all in the Ubuntu forums, but not the solution at my problem.

I have reformatted this partition one month ago.

I understand. But this doesn’t explain why in my external SSD – that I use as a mirror of the ntfs partition on my internal SSD – the ntfs partition runs without problem.

Please :slight_smile:

Important knowledge

Please select the text in the terminal
Paste the text into the post
Select the newly pasted text in the post
Click the </> icon in the post toolbar

This creates nicely formatted text.

(Text was copied from @ linux-aarhus)

Need less place and will like very much by phone/tablet user :wink:

To edit old posts seems possible :slight_smile:

There's definitely more :wink:

Different drive, I do not know. Are the partitions the same size? Are they both equally full?

But a SSD without TRIM will degrade in performance due to write amplification. The less free space there is, the worse it will be.

If the partition seems to work fine after you format it (a format operation also trims the partition), then slowly gets worse over time, this would be the best explanation.

If the partition performs like this even after a format, we would need a different explanation.

But also, since this partition is for dual-boot use, how often do you boot into Windows? Because Windows should trim this partition. So just boot into Windows, optimize the drive, and see if it makes a difference.

During what activity? Read? Write? Only trying to mount it?

What happens if you uncomment the fstab entry and let Thunar mount it (you do not need to be root for this).

/media/storage

De-configure mounting as root and configure it to mount as user, properly, with user groups, fstab mount parameters and possibly mount point permissions (I don't prefer this).
If a normal disk usage cannot be done with normal user account, the answer is not to "use the root account".
Proper configuration, or a bug must be found.
Archwiki mount/fstab and man mount have a lot of info and examples.

1 Like

I mount all my permanent external partitions to /run/media. I have read the explanations for why /media is better, but the explanations seem like preference rather than good practice. The only real danger is if a new device has the same name as an old device. But devices are auto-mounted using UUID so this does not seem likely.

I find it more convenient having all the drives mounted to one location. So when I mount new drives, I can see all of them right away.

But of course, I do not mount them under /run/media/root. @micman this is a very dangerous practice mounting external partitions as root.

BTW, this is how I mount my ntfs partitions. I use autologin, so that is why gid=1001. On systems without autologin, gid=1000. Also, APPS is not mounted at boot time. This fstab is for user yena.

UUID=01D3219CD10FBA40   /run/media/yena/FILES   ntfs    defaults,noatime,big_writes,uid=1000,gid=1001,dmask=022,fmask=133,nofail,x-systemd.device-timeout=15            0       0
UUID=01D3328390BB87B0   /run/media/yena/APPS    ntfs    defaults,noatime,big_writes,uid=1000,gid=1001,dmask=022,fmask=133,nofail,x-systemd.device-timeout=15,noauto     0       0

big_writes help with cpu usage (under normal conditions).

OK. Thanks for your various help. It seems that there was a double problem.

First, I have changed my ntfs-3g options in fstab in agreement with korealinx’s suggestion (without autologin) from
ntfs uid=root,gid=users,umask=0022 0 0
to
ntfs defaults,noatime,big_writes,uid=1000,gid=1000,dmask=022,fmask=133,nofail,x-systemd.device-timeout=15 0 0

In this way, everything works well if I log in as "normal" user. Contrariwise, if I log in as root, the problem reappears at startup if I launch automatically some program (e.g. Goldendict and Zim).

Second, I have changed the ntfs mountpoint in accordance with the petsam’s suggetion from
/run/media/root/STORAGE
to
/media/storage
Apparently, in this case all work well both unprivileged user and root.

For security reasons, I understand the advantage to generally log in as unprivileged user and not as root, but to do the "transition" from the one to the other I need a lot of time to install many packages as user that now I use as root and to reconfigure them and some other package. I can do it only progressively.

1 Like

You mean you were logging in as root user all this time? sudo is our friend.

1 Like

Thank. I'll keep it in mind.
After some other attempt, I conclude that the principal problem was the mont point, but it remains inexplicate why the ntfs partition on the external SSD located in "/run/media/root/RESERVOIR" works normally with the same configuration which failed on the ntfs partition on the internal SSD.
However, I consider that the problem is essentially solved.

1 Like

It is probably something related to permissions.

And you are probably using the two drives differently. If it was the exact same setup with the exact same usage, of course they would behave the same.

The permissions that I have setup were and are the same. But it's true that sometimes, after that I have launched Windows, which has happened very rarely, when I came back to Linux, the permissions were changed. In any case, for now all works correctly on the two partitions.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by