× NETGEAR will be terminating ReadyCLOUD service by July 1st, 2023. For more details click here.
Orbi WiFi 7 RBE973
Reply

Defrag, 'nice' 'ionice' not working OS6.6 & OS6.7-T206

Michael_Oz
Luminary

Defrag, 'nice' 'ionice' not working OS6.6 & OS6.7-T206

RN316 OS6.7-T206 (noticed on 6.6 earlier too)


I noticed the NAS is a bit laggy when Defrag is running, I came across the commands after installing PHPSysinfo (needed to see disc usage as quota are off ATM).


It wants a nice 10 and ionice 7, but runs with -1 & 4/0 (io is presumably dynamic based on nice level)

# ps -Alf
F S UID        PID  PPID  C PRI  NI ADDR SZ WCHAN  STIME TTY          TIME CMD
4 S root      3337     1  0  79  -1 - 518271 poll_s Mar20 ?       00:15:31 /usr/sbin/readynasd -v 3 -t
0 S root     14134  3337  0  79  -1 -  1084 wait   Mar21 ?        00:00:00 sh -c nice -n 10 ionice -c 2 -n 7 btrfs subvol list -q /N316AR6 | awk '{ if($9 == "-") system
0 S root     14136 14134  0  79  -1 -  1852 wait   Mar21 ?        00:00:00 awk { if($9 == "-") system("btrfs fi defrag -r \"/N316AR6/"$11"\"");}
0 S root      5905 14136  0  79  -1 -  1084 wait   Mar21 ?        00:00:00 /bin/sh -c btrfs fi defrag -r "/N316AR6/Video"
0 D root      5906  5905  5  79  -1 -  3964 balanc Mar21 ?        00:46:35 btrfs fi defrag -r /N316AR6/Video

# ionice -p  3337 14134 14136 5905 5906
(edited to add pid's below)
3337  none: prio 0
14134 none: prio 4
14136 none: prio 4
5905  none: prio 4
5906  none: prio 0

(why is code misaligned, they were aligned when I pasted it!!!)

prio of zero is best hence it will get treated very nicely...and nice -1, better than smbd, apache, ssh, fvbackup.


I'm not a Linux expert, but in my wonderings I read that apparently sh has a different nice with different parameters to the bash nice. ??


Having looked at the nice levels, there are a bunch of system processes at nice zero, which I though would be lower. Like kswapd & systemd-journald, but what do I know...

Model: RN31600|ReadyNAS 300 Series 6- Bay
Message 1 of 10
Michael_Oz
Luminary

Re: Defrag, 'nice' 'ionice' not working OS6.6 & OS6.7-T206

Just to reenforce this, my weekly backup, with Defrag yet to finish, is taking hours loooonger to finish.

Message 2 of 10
Michael_Oz
Luminary

Re: Defrag, 'nice' 'ionice' not working OS6.6 & OS6.7-T206

Detailing the above backup performance, with defrag running (NI=-1) PC backup via SMB took 14.5 hours, normally ~2-5 hours.

 

Scrub does not use nice or ionice, runs at NI -1, hence has similar impacts

 

F S UID        PID  PPID  C PRI  NI ADDR SZ WCHAN  STIME TTY          TIME CMD
1 S root     26652     1  3  79  -1 -  8045 futex_ Mar26 ?        01:15:52 btrfs scrub start /N316AR6
Message 3 of 10
Michael_Oz
Luminary

Re: Defrag, 'nice' 'ionice' not working OS6.6 & OS6.7-T206

BTW

I looked into why those code boxes are misaligned. Your CSS definitions override the pre definition, but don't specify a replacement, hence the code box uses the same font as the rest of the post, not a monospaced font.

 

netgear-reset.css
  ... pre ...
    font: inherit;

#lia-body .lia-content .lia-message-body-content pre,
(is not defined anywhere, so needs:)
  font-family: monospace;
(or a specfic monospaced font)
  font-family: "Lucida Console","Courier New", Courier, Monaco, monospace;
(also...)
  font-size: 0.9em;
  line-height: 0.9125;
  tab-size: 2;
(would also be good)
(I'd also recommend <code> tags)
Message 4 of 10
Michael_Oz
Luminary

Re: Defrag, 'nice' 'ionice' not working OS6.6 & OS6.7-T206

6.7.4 still has the nice & ionice not working, defrag is still running at -1, a higher priority than other important processes.

Message 5 of 10
JennC
NETGEAR Employee Retired

Re: Defrag, 'nice' 'ionice' not working OS6.6 & OS6.7-T206

Hello Michael_Oz,

 

Have you tried the official release of 6.7.5?

 

Regards,

Message 6 of 10
Michael_Oz
Luminary

Re: Defrag, 'nice' 'ionice' not working OS6.6 & OS6.7-T206


@JennC wrote:

Hello Michael_Oz,

 

Have you tried the official release of 6.7.5?

 

Regards,


I'm not falling for that one again.

 

Do you have anything that suggests 6.7.5 has fixed the nice/ionice use?

 

Message 7 of 10
btaroli
Prodigy

Re: Defrag, 'nice' 'ionice' not working OS6.6 & OS6.7-T206

https://kb.netgear.com/000038857/ReadyNAS-OS-6-Software-Version-6-7-5

 

Reduced the time it takes for defrag operations, by shrinking the target extent size.

Doesn't suggest anything regarding the I/O bandwidth scaling or running nicely on the system has changed, but it is a change to defrag. 🙂 Honestly, this has been an issue for a long time. If this new community interface wasn't so damn annoying, I might try finding one of the old threads where this has come up. But suffice to say that I'm not sure they've fixed it yet. I continue to leave most of my volume maintenance jobs disabled... especially scrub.

 

Defrag, actually, shouldn't really be THAT required. But balance -- which seems to do OK performance wise -- and scrub (which was still perfectly horrible the last time I tried it recently) are ones you really do want to run with some regularity... once a month or quarter at least.

Message 8 of 10
Michael_Oz
Luminary

Re: Defrag, 'nice' 'ionice' not working OS6.6 & OS6.7-T206

btaroli wrote:

Doesn't suggest anything regarding the I/O bandwidth scaling or running nicely on the system has changed, but it is a change to defrag. 🙂

 

https://community.netgear.com/t5/ReadyNAS-Beta-Release/ReadyNAS-OS-6-Software-Version-6-7-5-Question...

 

"The default changed from 256KB to 32MB in 6.7.0, which made defrag operations take much longer because were were now attempting to defrag any chunks smaller than 32MB instead of 256KB.  6.7.5 brings that down somewhere in the middle, and sets the target extent size to 4MB."

 

> If this new community interface wasn't so damn annoying, 

 

+1e9

Message 9 of 10
Skywalker
NETGEAR Expert

Re: Defrag, 'nice' 'ionice' not working OS6.6 & OS6.7-T206


Michael_Oz wrote: 

Do you have anything that suggests 6.7.5 has fixed the nice/ionice use?

 

Yes, nice/ionice levels were changed for defrag in 6.7.5 along with the target extent size change.

Message 10 of 10
Discussion stats
  • 9 replies
  • 4783 views
  • 2 kudos
  • 4 in conversation
Announcements