Qqwy

Qqwy

TypeCheck Core Team

Does using a large ETS table make app restart take longer?

I was talking with someone about possibly using an in-memory database to make searching through the (±1.5 gigabyte of) data more efficient.

He asked me if I knew what impact the use of an in-memory database such as ETS would have on the startup (and therefore also restart) time of the application. I have not been able to find any information about this so far. Could someone explain to me what ETS does at startup and how much longer it will take your application to be fully started when you use it?

First Post!

Neurofunk

Neurofunk

I don’t have an answer, but keep in mind that ETS & DETS can’t store more than 2GB of data =)

Most Liked

benwilson512

benwilson512

Author of Craft GraphQL APIs in Elixir with Absinthe

I’m a bit confused by the question. ETS tables don’t survive application restart, so the size it is on shutdown doesn’t affect its size when you restart.

If you have some process for initializing the table then that is gonna be the relevant bit as I see it. You can do it sync or aync to your application boot process depending on whether it makes any sense to have stuff running on a partially initialized table.

Qqwy

Qqwy

TypeCheck Core Team

Ah, I see. I did not realize that ETS tables are ephemeral (which of course makes a lot of sense).
So: Yes, the ETS table would need to be filled with data before the application could provide most of its functionalities, so it makes sense to do this during the boot process.

Maybe this whole question is somewhat nonsensical, as startup time is obviously something that only happens once, and therefore is much less important than per-request efficiency.

dom

dom

2GB is the limit for DETS, not ETS. ETS tables are essentially as large as you want on a 64-bit system.

Where Next?

Trending in Questions Top

jonnycharles
I’m in search of an Elixir library that offers PDF generation capabilities similar to Ruby’s Prawn. While there have been discussions abo...
New
spammy
I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on t...
New
silverdr
Using Phoenix.LiveView.TagEngine as an EEx.Engine is deprecated! To compile HEEx, use Phoenix.LiveView.TagEngine.compile/2 instead. Sta...
New
saveman71
Hello ! We want new/edit form pages to POST/PUT to their own URL rather than the resources REST defaults (post /things, put /things/:id)...
New
dli
Before I dive in myself, did anyone successfully sprinkle Hologram into their existing LiveView app? Looking for hints regarding: Addi...
New
bottlenecked
Hi all, I wanted to ask how the community is dealing with post-release steps. Today we have Ecto migrations, which make sure that the db...
New
michallepicki
I am using Oban and occasionally, shortly after a deployment, a handful of jobs can fail because of dependency on other parts of the syst...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
ausimian
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
type1fool
I just stumbled on a newly redesigned elixir-lang.org. :tada: It looks like @Software_Mansion did the work, and I think it is generally a...
New
akoutmos
@hugobarauna and I (Alex Koutmos) have been hard at work on writing a book on Nerves that takes you from simply blinking LEDs to building...
New

We're in Beta

About us Mission Statement