INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: [Solved] Sluggish performance when tag editor is open  (Read 3303 times)

BryanC

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2554
[Solved] Sluggish performance when tag editor is open
« on: November 05, 2021, 08:20:31 am »

JRMark:
  • Math: 4188
  • Image: 7395
  • Database: 2765 ('Search Database' takes over 4 seconds')

I thought it could be related to CoW (btrfs) but there aren't many writes in ~/.jriver so not sure if nocow or noatime are relevant.

I'm sending a library backup and logs from when I click around on items with the tag editing window open.
Logged

HaWi

  • Citizen of the Universe
  • *****
  • Posts: 905
Re: Sluggish performance when tag editor is open
« Reply #1 on: November 08, 2021, 12:14:22 pm »

I see very sluggish scrolling on both the Synology and the rPi4 (even when the tags window is not open), to the point where it is not feasible to any editing at all. Constant freezes last many seconds.
Logged
rPi5/8GB, Debian 12 Bookworm on SSD | JRMark (32.0.36 64 bit): 2699
MacBookPro (2013), 2.6 GHz Quad-Core Intel Core i7, MacOS 11.7.17 | JRMark (32.0.38 64 bit): 3764
Mac Studio M2 Max, 64GB, 1TB SSD, macOS Sonoma 14.4.1 | JRMark (32.0.38 64 bit): 9235
Docker Container (shiomax) DS1819+ | JRMark (32.0.36 64 bit): 1430
JRemote 3.43
MO 4Media 1.5.7 | Marantz SR7007 (RSL 5.1) HDMI to MacBookPro

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13487
Re: Sluggish performance when tag editor is open
« Reply #2 on: November 09, 2021, 10:11:55 am »

Can you detail steps to reproduce this on a standard platform (not NAS)?
Also what build did you notice this behavior starting and what build are you using now??

I'm not seeing it.
Logged

BryanC

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2554
Re: Sluggish performance when tag editor is open
« Reply #3 on: November 10, 2021, 07:10:12 am »

Can you detail steps to reproduce this on a standard platform (not NAS)?
Also what build did you notice this behavior starting and what build are you using now??

I'm not seeing it.

I sent a library backup to logs@jriver.com. I'm on my desktop, no NAS involved. MC and  database are on an NVMe drive and the library (files) are stored on a RAID1c3 spinning rust btrfs array.

In Movies standard view>select a movie thumbnail>Alt+Enter to open tag window>Click another movie thumbnail, the whole UI will be unresponsive for about 5 seconds and then the tag editor window will finally show the details for the newly selected item. This happens every time I try to select a file with the Tag Editor window open.

If you cannot reproduce, my hunch is that it's a CoW performance issue since we're dealing with a database.
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 71341
  • Where did I put my teeth?
Re: Sluggish performance when tag editor is open
« Reply #4 on: November 10, 2021, 08:09:50 am »

Client/server?

Or network drive?
Logged

BryanC

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2554
Re: Sluggish performance when tag editor is open
« Reply #5 on: November 10, 2021, 08:37:25 am »

I'm working locally on the server, no network drives, all SATA or NVMe.

Also what build did you notice this behavior starting and what build are you using now??

Missed this. I'm using 28.0.81, I first noticed it a few point releases ago, but I've also been importing a lot of new items (more than normal) into the library so not sure if that was what triggered it. If I had to say, I think the sluggishness has been getting worse I've grown the library.
Logged

HaWi

  • Citizen of the Universe
  • *****
  • Posts: 905
Re: Sluggish performance when tag editor is open
« Reply #6 on: November 10, 2021, 10:01:56 am »

Sorry to say but 28.0.81 is even less responsive on the rPi4 than .79 or .80. The last good one was .73
BTW, the benchmark values haven't changed significantly between .73 and .81
Logged
rPi5/8GB, Debian 12 Bookworm on SSD | JRMark (32.0.36 64 bit): 2699
MacBookPro (2013), 2.6 GHz Quad-Core Intel Core i7, MacOS 11.7.17 | JRMark (32.0.38 64 bit): 3764
Mac Studio M2 Max, 64GB, 1TB SSD, macOS Sonoma 14.4.1 | JRMark (32.0.38 64 bit): 9235
Docker Container (shiomax) DS1819+ | JRMark (32.0.36 64 bit): 1430
JRemote 3.43
MO 4Media 1.5.7 | Marantz SR7007 (RSL 5.1) HDMI to MacBookPro

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13487
Re: Sluggish performance when tag editor is open
« Reply #7 on: November 10, 2021, 10:10:23 am »

Sorry to say but 28.0.81 is even less responsive on the rPi4 than .79 or .80. The last good one was .73
BTW, the benchmark values haven't changed significantly between .73 and .81
Thanks that version info helps.
It's quite a bit faster and less jerky for me on AMD64.
Logged

HaWi

  • Citizen of the Universe
  • *****
  • Posts: 905
Re: Sluggish performance when tag editor is open
« Reply #8 on: November 10, 2021, 10:23:44 am »

Thanks that version info helps.
It's quite a bit faster and less jerky for me on AMD64.
I realize that the rPi4 and the Synology have crappy CPUs so they weren't performing great from the get-go but scrolling has deteriorated significantly since .73
On the iMac and MacBook Pro on the other hand scrolling has improved a lot. Much smoother now and everything feels snappier since .79 with small improvements in .80 and .81 (just by feel)
Logged
rPi5/8GB, Debian 12 Bookworm on SSD | JRMark (32.0.36 64 bit): 2699
MacBookPro (2013), 2.6 GHz Quad-Core Intel Core i7, MacOS 11.7.17 | JRMark (32.0.38 64 bit): 3764
Mac Studio M2 Max, 64GB, 1TB SSD, macOS Sonoma 14.4.1 | JRMark (32.0.38 64 bit): 9235
Docker Container (shiomax) DS1819+ | JRMark (32.0.36 64 bit): 1430
JRemote 3.43
MO 4Media 1.5.7 | Marantz SR7007 (RSL 5.1) HDMI to MacBookPro

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 71341
  • Where did I put my teeth?
Re: Sluggish performance when tag editor is open
« Reply #9 on: November 10, 2021, 02:53:09 pm »

Does build 73 still work as expected?
Logged

HaWi

  • Citizen of the Universe
  • *****
  • Posts: 905
Re: Sluggish performance when tag editor is open
« Reply #10 on: November 10, 2021, 03:22:58 pm »

Does build 73 still work as expected?
yes, it does
Logged
rPi5/8GB, Debian 12 Bookworm on SSD | JRMark (32.0.36 64 bit): 2699
MacBookPro (2013), 2.6 GHz Quad-Core Intel Core i7, MacOS 11.7.17 | JRMark (32.0.38 64 bit): 3764
Mac Studio M2 Max, 64GB, 1TB SSD, macOS Sonoma 14.4.1 | JRMark (32.0.38 64 bit): 9235
Docker Container (shiomax) DS1819+ | JRMark (32.0.36 64 bit): 1430
JRemote 3.43
MO 4Media 1.5.7 | Marantz SR7007 (RSL 5.1) HDMI to MacBookPro

BryanC

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2554
Re: Sluggish performance when tag editor is open
« Reply #11 on: November 12, 2021, 01:20:53 pm »

28.0.73 isn't nearly as sluggish, although it's still not as fast I hope it can be.
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13487
Re: Sluggish performance when tag editor is open
« Reply #12 on: November 12, 2021, 03:06:40 pm »

Got a new one coming in the next hour or so that seems to fix the issue.
Logged

BryanC

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2554
Re: Sluggish performance when tag editor is open
« Reply #13 on: November 12, 2021, 06:25:00 pm »

28.0.83 is much better!
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13487
Re: Sluggish performance when tag editor is open
« Reply #14 on: November 12, 2021, 11:30:46 pm »

28.0.83 is much better!
I thought so as well.
It seems to me to be more responsive than any previous version.
Logged

HaWi

  • Citizen of the Universe
  • *****
  • Posts: 905
Re: Sluggish performance when tag editor is open
« Reply #15 on: November 14, 2021, 10:12:24 am »

28.0.83 is much better!
Agreed. On the rPi4, scrolling is now back to about the same as .73, possibly even better.
Logged
rPi5/8GB, Debian 12 Bookworm on SSD | JRMark (32.0.36 64 bit): 2699
MacBookPro (2013), 2.6 GHz Quad-Core Intel Core i7, MacOS 11.7.17 | JRMark (32.0.38 64 bit): 3764
Mac Studio M2 Max, 64GB, 1TB SSD, macOS Sonoma 14.4.1 | JRMark (32.0.38 64 bit): 9235
Docker Container (shiomax) DS1819+ | JRMark (32.0.36 64 bit): 1430
JRemote 3.43
MO 4Media 1.5.7 | Marantz SR7007 (RSL 5.1) HDMI to MacBookPro

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5174
  • "Linux Merit Badge" Recipient
Re: Sluggish performance when tag editor is open
« Reply #16 on: November 14, 2021, 11:48:10 am »

The latest build is much more responsive, and it solved a long-standing UI quirk of the linux versions where fast scrolling would sometimes create several seconds of input lag.  Now if I hurl the scroll wheel, I can start scrolling in the opposite direction to stop the scroll momentum almost immediately (just like Windows).   Great stuff!
Logged

HaWi

  • Citizen of the Universe
  • *****
  • Posts: 905
Re: Sluggish performance when tag editor is open
« Reply #17 on: November 16, 2021, 10:06:15 am »

The docker version is also now much more responsive. However, and this may just be due to my setup, when the tag window is open, scrolling through a panel is slow and switching focus between tag window and panel is a bit painful as the tag window is still scrolling and the panel unresponsive, and vice versa. It's back to being useful though.
Logged
rPi5/8GB, Debian 12 Bookworm on SSD | JRMark (32.0.36 64 bit): 2699
MacBookPro (2013), 2.6 GHz Quad-Core Intel Core i7, MacOS 11.7.17 | JRMark (32.0.38 64 bit): 3764
Mac Studio M2 Max, 64GB, 1TB SSD, macOS Sonoma 14.4.1 | JRMark (32.0.38 64 bit): 9235
Docker Container (shiomax) DS1819+ | JRMark (32.0.36 64 bit): 1430
JRemote 3.43
MO 4Media 1.5.7 | Marantz SR7007 (RSL 5.1) HDMI to MacBookPro

BryanC

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2554
Re: Sluggish performance when tag editor is open
« Reply #18 on: December 30, 2021, 09:20:11 am »

I resolved the majority of my remaining performance issues in MC by mounting my BTRFS media drives with noatime. This prevents an unnecessary CoW whenever MC (tag editor?) accesses a file for the first time within a 24 hour period.
Logged

BryanC

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2554
Re: [Solved] Sluggish performance when tag editor is open
« Reply #19 on: February 17, 2022, 01:39:10 pm »

I'm running into performance issues again, even with noatime. It's amplified about five-fold whenever the tag editor is open. When I'm on a Media Server client, I don't have any issues (only locally on the server) so I don't think the library is the issue. Clicking around on various fields can take as long as 3 or 4 seconds to register when the tag editor is open. Pane tagging OTOH feels just as fast as I would expect it to.

Btrfs CoW + databases is not a good combo but the system drive is a super fast NVMe that I think would mask any performance problems if this were the culprit.

My actual media library is on a 9 drive Btrfs RAID1 array that benchmarks at around 350 MB/s read/write in other applications so it isn't a slump either. But I can imagine that a lot of non-sequential reads (like loading bulk metadata from files) could be a bottleneck. But, presumably this shouldn't be happening just clicking around the UI.

I haven't had this problem on other filesystems on Linux so it's definitely a Btrfs thing, I just wish I knew whether this was caused by the MC database on my system drive or by MC accessing (and thus CoW'ing) my media files when the tag editor is open. Since this doesn't happen on an MC client I'm guessing there is some disk operation occurring in the local instance that is handled in memory by the database on clients.
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5174
  • "Linux Merit Badge" Recipient
Re: Sluggish performance when tag editor is open
« Reply #20 on: February 17, 2022, 01:50:22 pm »

So a datapoint I can offer you is that all of my media files are on a BTRFS drive with COW enabled, but my JRiver database is on a normal EXT4 filesystem on my server.  I experience no slowdowns when tagging ever.  That leads me to suspect you're encountering issues with the database and BTRFS.  My understanding is that clients download the server's database once on initial connect and keep it in memory (and if you have auto sync enabled they sync up periodically) so that's more support for server database disk access being the culprit.

Have you tried turning COW off for the JRiver database directory?  It's trivial to do, and the COW performance penalty for databases/VMs is pretty intense.  My understanding is that it can  also (or at least it used to be able to) cause corruption. I haven't tried running a VM or Db on BTRFS in a few years, but the last time I tried to run a VM on a BTRFS drive with COW enabled it was semi-unusable. So now I always follow the stock advice and either disable COW for relevant directories or just stored my databases/VMs on non-BTRFS filesystems.
Logged

BryanC

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2554
Re: Sluggish performance when tag editor is open
« Reply #21 on: February 17, 2022, 02:14:50 pm »

Thanks and oh duh, I had disabled CoW for my MC28 directories specifically ("~/.jriver/Media Center 28" and "/usr/lib/jriver/Media Center 28"), but not the parents ("~/.jriver" and "/usr/lib/jriver") so subsequent MC version installations (the beta) reverted to CoW (that's why the problem suddenly cropped up again). Hopefully this can help someone else in the future.

Code: [Select]
sudo chattr -R +C /usr/lib/jriver
chattr -R +C ~/.jriver

I don't know which one is the culprit (the system or user directory) but thanks to MC's library backups I'm fine keeping them both disabled. I'm going to add this step to installJRMC if btrfs is detected.
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5174
  • "Linux Merit Badge" Recipient
Re: [Solved] Sluggish performance when tag editor is open
« Reply #22 on: February 17, 2022, 02:23:31 pm »

Aces, glad you got it fixed!
Logged
Pages: [1]   Go Up