Typing lag when working on NAS

Hi there,

Not really a Scrivener issue I guess, but maybe someone has some advice anyway.
Working on a Scrivener project on the local drive of my laptop is nice and smooth. But when the project is stored on my NAS sometimes there is a little lag, especially when I’ve paused for more than ten seconds. That is, when I keep typing all is well, but if I pause between key strokes too long, it still registers, but it takes some time for those letters to appear on screen.
This doesn’t happen with Word documents that save automatically.

Anyway, thanks beforehand for the reactions.

1 Like

Well, have to admit to a moment of natural smile here, as though I’m sure persons have their reasons for using a NAS, it also sometimes seems like having an off-road SUV which only sees city streets :slight_smile:

In fact, though, I thought of it myself, for some idea of combining with a smaller laptop, but concerned among other things for the sorts of delays you see, in software other than Scrivener which would naturally show them.

Here are a couple of ideas, if they can possibly help:

  • where do you have Scrivener installed? On the laptop would be correct (and likely). I’m just thinking about its need to reference spell dictionaries for example, which are in the install.

  • the slows-after-pause that you see might hint another angle: Scrivener’s auto-backups.

Those should in all likelihood be stored on your laptop, both to avoid a pause while they write, and for diversity’s safety, also just plain assurance-of-write safety. You might check to be sure, in File | Options | Backup (icon on far right) .

This will be the place, unless you’ve made a special Project | Project Settings override.

And you could try om those settings just unchecking Automatic Backups for a moment, to see if your delay goes away with those off.

  • third point of call would be your NAS itself. I would presume that would be always running, instantly available, but maybe it’s not – maybe it goes to sleep after a period of inactivity, then boots up the drives on request, as a battery setting on a laptop might.

You could look at this. And if it’s the problem, either set a longer keep-alive period if that’s possible, or ise the evident workaround, which would be to keep your Scrivener projects only on the laptop, and copy them (very thoughtuflly, only after fully closed…) to the NAS.

In fact, I’m not sure how you’re working on a project with and without the NAS at present…

Hope ideas here can help, and best with this…
Clive

1 Like

I would like to amend the contribution of @narrsd . It’s probably not the auto-backup, but the auto-save that might cause the delay. These are two different things. You can influence the auto-save feature under File → Options → General → Saving. The default for the “Auto-save after” setting is 10 seconds. You might want to try to increase that somewhat to see if your delay behavior changes accordingly. On my system I have it set to 300 seconds, thus only if I pause typing for some 5 minutes an auto-save will be performed.

1 Like

@NorbVor – you’re correct, thanks – I somehow was thinking for the moment they were the same…but not so, indeed.

And, good specific advice.

Generally, a NAS is not as instant as an internal drive.

You have the file command generated on board, which is then transmitted via ethernet or WiFi to the NAS, the processor in the NAS then gives the appropriate read command, retrieves the data and sends it back to the computer which then processes same.

As a NAS can have anything from a dog slow single core processor to a moderately fast quad core there can be a significant variation in first byte time. In simplest description, your computer, instead of getting data from itself is sending a request over a network to another computer to find data and send it back so it can process it.

In addition you can have a number of other factors. What time is set for the NAS to park heads/spin down absent any requests, or do they stay active as long as powered? What drive interface/technology is used? This can be anything from old IDE, through to latest NVMe.

I don’t ever recommend use of a NAS as a live project store. They are however great for backup and media storage.

1 Like

Hi RuffPub,

Well, we basically use the NAS for everything in this houshold, so we can access documents, photos, videos on any device. Not only our desktop and laptop, but also our iPads and iPhones. Our NAS is a Synology Diskstation and with the DS File app it works like a charm. I’m sure other brands of NAS will have similar applications.
Scrivener is the first and only program that we use with ‘live storage’, so this is the first time this kind of hiccup has occurred.

Hi NorbVor,

Thanks for your reply. Auto-save was set to save after 2 seconds of inactivity, which I pumped up to 2 minutes for starters. Now I can type continuously without having my train of thoughts interrupted by software lag.

But this probably means that if I type a huge text without any interruption longer than 2 minutes, nothing is auto saved at the end, right? Which means I should probably use ‘backup now’ a bit more often. Yes, I know that ‘Auto save’ and ‘Backup’ aren’t the same, but they both provide safety nets for sudden system failure.

Glad to hear. Regarding choosing the right interval for auto-save consider this: How often does a fatal NAS failure occur, once in five years perhaps? Could you manage to lose 10 minutes of work in such a case? Probably, yes. The default value for auto-save seems to me a little over-protective. And considering that modern SSDs have a limited write capacity, such a frequent auto-save might even be counter-productive.

Hi narrsd,

Well, I’ve been very happy for years with my NAS as central storage in our houshold, as you can read in my response to RuffPub. It’s been very reliable and it’s really easy to access anything anytime on any device. In the case of Scrivener: when working on a project I can easily switch between using my desktop and using my laptop (if the iOS version of Scrivener had direct access to the NAS I would use that too). Having that NAS has been a blessing in many of our workflows, so it’s nothing like that ‘SUV that sees only city streets’. Don’t get me wrong, I do appreciate the feedback though, because it’s always good to re-evaluate one’s modus operandi every once in a while.

However, Scrivener is the only program with automatic saving that I use, and that presented this lag issue for the first time. The problem started only recently, probably after upgrading to Scrivener 3, presumably because then the ‘Auto save after’ got set to 2 seconds. After changing that to 120 seconds all seems to go well. But at a cost: since Scrivener will now only auto save after 2 whole minutes of inactivity, I will probably have to rely more on ‘Back up Now’ as a safety net.

Hi NorbVor,

Those are reassuring words. Does Scrivener automatically save on closing? I’ve setup automatic Backups on closing as well. Also, there is a manual Save option.

Still, I wonder: if you have Auto save set to save after 5 minutes of inactivity, and you work for two hours straight without having an interruption over 5 minutes (which is not a strictly hypothetical situation), and then something goes wrong. Wouldn’t you loose the whole two hours, instead of just (5-)10 minutes of work? It’s not a 5 minute interval between auto saves, it’s a 5 minute interval between the start of the pause and auto saving. Am I seeing this correctly?

You are absolutely correct. In my personal case, I rarely type away two hours without interruption. There is always this little coffee break or other distractions that will provide a long enough inactivity for auto-save. And if I would lose an hour’s work every so many years that would not mean the end of the world to me. But a lagging keyboard response does drive me crazy. It’s a personal choice and gladly L&L made this configurable.

Just a word on NAS failure modes.

While spinners can have write and read failure modes in addition to various mechanical and other failures, SSDs I’ve come across typically have a write failure as that is their wear mode. It is common to be still able to read an SSD after an initial write fail, provided it is not a drive mounted catastrophic controller chip failure, even then recovery labs may be able to probe the board and read the data (usually at great expense).

As drives in my NAS units go beyond 3-3.5 years I am swapping them out for SSD’s on anything with 1TB or less drives (soon 2TB) and only replacing 4TB and above with spinners. I’m guessing by the time my current batch of 4TB drives reach that age 4TB SSD will be affordable. 8TB will be a longer wait.

Why 3-3.5 years? I know hard drives have a claimed life of five years and in the past I have had drives older than that working just fine, however just a few too many WD, Seagate and especially Samsung spinners crashing before 5 in recent years has me not taking the risk. I even had 3 Samsung 1TB drives go in less than a year, all within about 8 weeks. (rack mounted temperature controlled) I know with the right RAID it’s just a matter of pulling the drive, replacing and rebuilding, but I don’t need the time waste and agro these days. If your NAS is a storage rather than just backup device I strongly recommend a redundant RAID setup. JBOD and Raid 0 are a risk for any essential data.

As for auto-save times. As mentioned it is inactivity time. I can work (well could when I was working full time) for hours with no more than a few minutes of inactivity. Set the time that best suits your work patterns and the amount of work you are prepared to re-do.

2 minutes of inactivity is not the same as a 2 minute save interval.

Me, i would do all scrivener work on local files and then have a separate sync process to move Scrivener backups (not source) to the NAS.

Hi NorVorb,

I share your point of view. Having a project stored centrally and available to all devices AND avoiding time lag is more important to me than an abundance of auto saves. I’ll stick to my NAS and Auto Save After 120 sec.

Do you know if Scrivener auto saves upon closure?

@Repelstale I understand what you are doing. As long as others or other devices open the project at the same time and other caveats about sharing files…

That being said, to avoid confusion by others reading this thread, Scrivener does not have a setting for “autosave interval”, e.g. “after 120 sec”. The setting is for “seconds of inactivity”. Completely different than intervals between saves. For example, Microsoft Word does it with an auto-save intervale (different than inactivity time).

I understand. And I did mention exactly that in my response to NorVorb, as you can see.

Apologies. I was concerned when you said “Auto Save After 120 sec.”

Yes, and hopefully you also have it set to backup (to a separate location) on close.

Hi rms,

No problem. I completely understand it might cause confusion, so kudos for emphasizing the way it is.

Indeed I have the Backup set upon closing. Just wasn’t sure it saved as well.