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

Re: No recognized UPS disables drive cache?

Sandshark
Sensei

No recognized UPS disables drive cache?

I read in another post that connecting an UPS enables the drive cache.  Is this true?  Can it be manually enabled?

 

I installed Eaton Intellegent Power Protector on my NASes because it provides so much more information than NUT.  But I have to disable the NAS UPS detection for IPP to run.  So, have I effectively disabled the drive cache?

Message 1 of 15
Retired_Member
Not applicable

Re: No recognized UPS disables drive cache?

Hi @Sandshark, in the kernel.log please check for a string "[sda] Write cache: enabled, read cache: enabled". It shows up in my log for a 426 behind an APC Back-UPS ES 700 communicating to each other via usb/ethernet cable.

I did not find a way to enable/disable write caching through the admin page.

There might be a way using ssh through cli. I don't know the command.

Anybody else?

Message 2 of 15
StephenB
Guru

Re: No recognized UPS disables drive cache?

I see that string in my RN202 (running 6.9.4), and that NAS isn't set up for a UPS.

 

Message 3 of 15
Retired_Member
Not applicable

Re: No recognized UPS disables drive cache?

Hi @StephenB, I draw the following conclusion from your post:

(1) OS6 does not need an ups to enable the write cache at least for model RN202 (anybody else could confirm for other models?)

(2) With a power outage your RN202 will probably enter "the world of pain", as it will potentially not be able to successfully complete an ongoing writing operation and empty the write cache. Ramifications in this case are left to your imagination.

(3) There should be an easy way in OS6 to switch on the write cache either using the admin page or ssh. Iwill put a new suggestion into the idea section.

 

Message 4 of 15
StephenB
Guru

Re: No recognized UPS disables drive cache?

Turning off the write cache would also shorten the life of SSD drives (because it would increase the number of writes).

 


@Retired_Member wrote:

 

(2) With a power outage your RN202 will probably enter "the world of pain", 


It has no data on it, I only use it for testing.  ReadyNAS I use for primary storage and backup are all protected by UPS.

 

FWIW, the NAS is also caching writes in RAM, - this particularly setting is only about the write cache built into the drive.

Message 5 of 15
Retired_Member
Not applicable

Re: No recognized UPS disables drive cache?

@StephenB: Of course I'm referring to the disk write cache. However, all volatile caches are dying during a power outage. So, there is virtually no difference regarding the outcome of that incident.

@Sandshark: Can you please tell us, what your kernel.log says about the status of the write cache on the concerned harddisks or SSDs?

Message 6 of 15
StephenB
Guru

Re: No recognized UPS disables drive cache?


@Retired_Member wrote:

Of course I'm referring to the disk write cache. However, all volatile caches are dying during a power outage. So, there is virtually no difference regarding the outcome of that incident.

 


The point was that looking at the disk write cache isn't enough. 

 

In any event, whenever you write to a redundant RAID array there are updates to multiple disks.  Even if there is no caching, the array will get out of sync if the power fails or the system crashes in the middle of that process.  The odds might be lower, but the vulnerability still exists.

 

A UPS helps mitigate that risk, and I recommend that all NAS owners use one.  You also need a backup, since the UPS doesn't give you 100% protection from an unexpected shutdown.  Equipment can fail at any time, and of course users can make mistakes (pulling the wrong plug for instance).

Message 7 of 15
Retired_Member
Not applicable

Re: No recognized UPS disables drive cache?

@StephenB wrote: "The point was that looking at the disk write cache isn't enough. "

 

We are on the same page. No discussion about that. But we started this thread by discussing the disk write cache as a performance parameter. Data availability or security is important, but the open question is still: Is the disk write performance better with the disk write cache enabled and is that cache automatically enabled by hooking up the nas to a ups or not. Still missing @Sandshark's feedback on the status of his concerned disks and whether (s)he might observe degradation of writing performance in this scenario.

Message 8 of 15
StephenB
Guru

Re: No recognized UPS disables drive cache?


@Retired_Member wrote:

is that cache automatically enabled by hooking up the nas to a ups or not. 


I'm wondering where you got the idea that it might be coupled with the UPS.  I don't recall any statements from Netgear that suggests that possibility.  I've assumed that disk caching (both in NAS RAM and the disk write cache) was always enabled on the internal disks. That certainly is the case with my RN202, and I don't see why that behavior would be different for x86 OS-6 systems.  It would be useful if Netgear would give a bit more information on this topic (also on the cache management for USB disks).

 

As far as the disk write-cache impact on performance goes:  The caching memory in the disk costs money, and the size of that memory has increased over time.  The disk manufacturers wouldn't be interested in implementing a feature that both hurts performance and adds cost.  They of course control the use of the cache - in particular the amount of pending (cached) writes the disk firmware allows.  A correctly implemented cache will never hurt performance (compared with no cache), but it might not always help.  

 

As I noted above, disabling write caching can shorten the life of an SSD.  It would cripple the write performance of an SMR drive (though I don't recommend using them in RAID array, I'm sure many users are using USB SMR drives for backup).  On other drives, the write cache does allow the disk to re-order reads and writes, which can reduce seek times and disk thrashing.  

Message 9 of 15
Retired_Member
Not applicable

Re: No recognized UPS disables drive cache?

@StephenB wrote: "I'm wondering where you got the idea that it might be coupled with the UPS."

 

I started using ReadyNAS with an RN104 in 2013 first without using a ups. I found that hint on the internet (what a pity that I lost the source) and bought my first "APC BACKUPS ES 700" a few weeks later. After connecting the 104 to the ups I observed an increase in throughput of about 25% when writing files through smb from pc to nas (and that was ceteris paribus, which means nothing else was changed at that time, which could have been the alternate root cause for the improvement).

Message 10 of 15
Retired_Member
Not applicable

Re: No recognized UPS disables drive cache?

@StephenB wrote: "I'm wondering where you got the idea that it might be coupled with the UPS."

 

I found the source, where it says, that hooking up the nas to the ups is automatically turning on disk write caching:
https://community.netgear.com/t5/New-to-ReadyNAS/How-to-increase-write-performance-on-ReadyNAS/td-p/...

That still worked fine for my rn104 in 2013, as stated in the earlier post.

Message 11 of 15
StephenB
Guru

Re: No recognized UPS disables drive cache?


@Retired_Member wrote:

 

I found the source, where it says, that hooking up the nas to the ups is automatically turning on disk write caching:
https://community.netgear.com/t5/New-to-ReadyNAS/How-to-increase-write-performance-on-ReadyNAS/td-p/514942

 

That post goes back to the infrant days - 2005 is before Netgear aquired them.  It would apply to 3.x firmware on the original ReadyNAS (sparc platforms). Later on, when those platforms were running 4.x, Netgear went with an explicit write-caching control in the UI (which is still provided on OS 4 platforms).

 

OS 6 initially had a write-caching control, but at some point Netgear removed that option.  My assumption is that they made caching enabled by default when they removed it.  I can't explain the speed increase you saw in 2013, though perhaps you enabled the setting when you installed the UPS???  Another possibility is that Netgear pushed a hot fix (which you wouldn't have known about)???

Message 12 of 15
Retired_Member
Not applicable

Re: No recognized UPS disables drive cache?

@StephenB wrote: "I can't explain the speed increase you saw in 2013, though perhaps you enabled the setting when you installed the UPS???  Another possibility is that Netgear pushed a hot fix (which you wouldn't have known about)???"

 

No need for any further speculation, though. That's history and of no relevance anymore, I understand. I'm happy with my 426 now, disk write cache enabled and connected to a recognized ups.

 

So, the answer to @Sandshark's question "No recognized UPS disables drive cache?" is: NO, after all we know you are safe and the disk write cache does not care whether (1) you are hooked up to a recognized ups or (2) an unrecognized ups or (3) not any ups at all. It is always enabled.

Everybody who is still using a nas without ups should start thinking about getting one to reduce the risk of serious problems with data and system.

Message 13 of 15
StephenB
Guru

Re: No recognized UPS disables drive cache?


@Retired_Member wrote:

 

Everybody who is still using a nas without ups should start thinking about getting one to reduce the risk of serious problems with data and system.


Totally agree.

Message 14 of 15
Sandshark
Sensei

Re: No recognized UPS disables drive cache?

Sorry, I've been on vacation.  No, I see no statment at all in kernel.log concerning disk caching.  As far as where I got the idea it matters, it was in a rather recent post.  If this forum software had a decent search function, I could likely find it again.  But that others do have a message regarding the cache that is associated with the UPS and I have none does seem to give it more creedance.  

 

But I did find a general Linux discussion that suggested using 

hdparm -i /dev/sd(x)

To determine if disk write caching is enabled on a drive, and my NAS returns that it is on all drives in the main unit and the EDA500.. So unless the cache referenced in kernel.log is something else, it either doesn't matter or the cache was enabled when I had the UPS running with NUT monitoring and has never been disabled.

 

Nontheless, it seems I have probably answered my own question.  And it makes sense, I didn't see any loss in performance.

Message 15 of 15
Top Contributors
Discussion stats
  • 14 replies
  • 1337 views
  • 0 kudos
  • 3 in conversation
Announcements