Is it safe to kill -KILL the node with hashstore?

A bunch of questions.

  • Is it safe to kill the node process with KILL?
  • Or shall I be sending TERM and waiting?
  • How long is recommended timeout? (I see mentions of 300 seconds on the forum but that’s obnoxious).
  • is there any recovery and cleanup if, e.g. UPS fails?
  • Same questions, but when using memtable.
1 Like

I’ve casually noticed just when issuing a docker stop command that it takes like… up to 15 seconds? to stop storagenode running now.

2 Likes

It’s better to do it this way instead of KILL:

It’s a recommended timeout on case of locks or a very slow system, like rpi. But in your case you need to find the optimal timeout for your system under load.

When I send TERM it usually exits within 1 second. The concern is that if it actually needs more in some corner cases – my UPS can only sustan the sytem for 5 min..

So I take it sending KILL is not a good idea? Somethign gets corrupted? If so, how do I clean up on the next boot?

KILL may corrupt something, like SQLite databases, maybe it can also leave some not deleted partial uploaded pieces, but they would be cleaned with a garbage collector eventually. If you migrated to hashstore, it may not have a time to flush the received piece to the log file if your system under load.
If TERM works great, why do you need KILL?

I don’t. I send TERM, following KILL, if it did not shut down in 30 seconds. This is default behaviour for most services.

My question is hypothetical – whether there are any safeguards and what will I lose, but so far it shuts down every time gracefully within a second.

1 Like

I actually never saw a KILL on my nodes, except the case when I attempted to migrate my server to Linux:

It was so slow with NTFS, that even 300 seconds not always was enough. :person_shrugging:
Of course, if this server worked stable under Linux, it wouldn’t use NTFS.

:scream:

Thats a like a Tarantino horror movie!. NTFS on linux, forced windows updates, and then node on linux on ntfs, because why not at this point :slight_smile:

NTFS on linux is a reverse engineered unstable crap, that does not support half the features. And NTFS itself is not suitable for anything serious. The ReFS was promising but like everything half-decenlt microsoft murdered. But that’s a rant for a differnt day.

Of course I knew about this. This exercise was specifically for users, who:

  1. Imagined, that NTFS under Linux will work great
  2. Doesn’t have a free HDD to normally migrate their data to ext4, so here was a description how to do it in-place
  3. Believed that all HW can be used under Linux.
1 Like

Yeah, you could just as well run networking on RFC 1149. And each Thursday morning after a full moon it would still be better than running a node on a Synology box.

2 Likes

We might need to go modern with RFC 2549 :rofl:
.. wouldn’t want to keep the StorJ customers waiting too long on TTFB :laughing:
(sorry couldn’t resist this sitetrack hah..)

Anyway for my nodes I use a waittime of max 45 secs, and force shutdown afterwards - ie. in controlled shutdown script for my nut configuration if UPS runs dry.
Havnt seens issues - even with heavy load, shutdown is almost instant- so in my mind it’s more a matter of a safeguard in case something is really wrong with the host.

1 Like

Of course. Why else would you inflict such pain on yourself.

I also like experimenting and proofs :slight_smile:

1 Like

Linux console SNO here, kill -SIGINT has always terminated the storagenode process right quick on my setup(s). To my understanding it is equivalent of tapping CTRL-C in the console. A far as I’ve been able to tell, storagenode process does handle CTRL-C cleanly.

kill -KILL, kill -SIGKILL or oldskool kill -9 all sound like an overkill to me.

  • pun indented

Buy I like my Synology box :frowning:

BTRFS implementation on md raid is pretty alright, and when just used for ISCSI, there’s plenty of performance.

  • Oh Docker is severely outdated?
  • Oh new models ship with 10 year old CPUs?
  • Oh the hardware is severely hampered compared to competition?
  • Oh the PSUs are shit?
  • Oh I have to use their own inhouse drives now?

… shit

1 Like

The only thing I don’t like with Synology NASes is the awful noise they make, but they work pretty well for Storj. I hope I don’t jinx them, but in 5 years, I didn’t had any hardware fail. I baught spare chargers and fans, but I didn’t had to use any so far.

Synology hardware is very good. Especially the metal units. It’s well thought out, with attention to details, and very serviceable.

It’s their software, marketing, company direction, and customer service that sucks. So pretty much – everything else around the hardware.

And if you look at it further critically – it’s not that hard to find a good hardware. And not vendor-locked at that, too. So, no, synology is shit. “it did not break for me yet” is not a good justification to stay with them. It’s a Stockholm syndrome speaking. Vote with your $$ and buy a server, install FreeBSD (none of that linux GPL nonsense) and improve your level of happiness (at least in the area of running services). That’ what I would have done. And I had. And I"m very happy. (Still on the path of getting rid of GPL from around my life, but that’s a story for a different topic)