"Pinning" a table in memory

52 views
Skip to first unread message

Eric24

unread,
Jul 19, 2016, 3:53:52 PM7/19/16
to OrientDB
Is there any mechanism (in ODB 2.2.x) to "pin" a specific table in a database in memory?

Essentially, within a normal plocal disk-backed database, I want to select a specific table that is always guaranteed to be in memory (obviously my application is making sure that this table is maintained in such a way that it doesn't grow later than the available memory, while still allowing plenty of memory for general caching, etc.). I still want the "in memory" table to be persisted to disk, but want it to be "pinned" to ensure the highest level of performance on reads. (Note that I don't expect that the "first read" of a particular record after a server restart would already be in memory, although that would be nice future enhancement--active pre-loading from disk of a designated "pinned" table).

I could almost accomplish what I'm looking for by creating a small in-memory database with just this one table, but in addition to this table not being persisted to disk, it also makes it more difficult to interact with other tables in the "main" database when necessary.

And the other downside is that in-memory databases can't currently be replicated (planned for 3.0: http://orientdb.com/docs/last/Roadmap.html). Just out of curiosity, is this still on track?

--Eric

scott molinari

unread,
Jul 20, 2016, 3:22:36 AM7/20/16
to OrientDB
I'd also love to see a memory only class in ODB.

Scott

Jacksen K

unread,
Jul 20, 2016, 4:07:15 AM7/20/16
to OrientDB
A persisted in memory class would be great!

Andrey Lomakin

unread,
Jul 20, 2016, 4:09:25 AM7/20/16
to OrientDB
Hi Guys,
We have all underlying infrastructure ready for that. 
If you wish such feature could you fill in a feature request  (that is not hard to do).

But of course, it may mean that other queries including other tables and indexes will be slower.

On Wed, Jul 20, 2016 at 11:07 AM Jacksen K <jackse...@gmail.com> wrote:
A persisted in memory class would be great!

--

---
You received this message because you are subscribed to the Google Groups "OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orient-databa...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Best regards,
Andrey Lomakin, R&D lead. 
OrientDB Ltd

twitter: @Andrey_Lomakin 

Eric Lenington

unread,
Jul 20, 2016, 10:31:54 AM7/20/16
to OrientDB
OK. I'll do that later today. If anyone has any specific suggestions you'd like to see as part of this request, please reply to this thread in the mean time (and please label as "critical", "important", and "nice to have").
--Eric


--

---
You received this message because you are subscribed to a topic in the Google Groups "OrientDB" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/orient-database/_xwbdw55_IM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to orient-databa...@googlegroups.com.

scott molinari

unread,
Jul 20, 2016, 10:41:33 AM7/20/16
to OrientDB
Hey Eric. Already done! 

https://github.com/orientechnologies/orientdb/issues/6447

Hope you don't mind.

Scott

Luca Garulli

unread,
Jul 20, 2016, 12:24:49 PM7/20/16
to OrientDB
Funny thing: this feature was already existent with the old LOCAL storage :-)

Best Regards,

Luca Garulli
Founder & CEO


--

Eric Lenington

unread,
Jul 20, 2016, 6:43:51 PM7/20/16
to OrientDB
@scott: No problem--thanks!

--

Andrey Lomakin

unread,
Jul 21, 2016, 4:34:39 AM7/21/16
to orient-...@googlegroups.com
Luca, 
Do you mean in memory clusters? That is different.
In memory clusters never stored data to disk.
But this feature is opposite, data stored to disk but cached on memory without a flush out to the disk.

Andrey Lomakin

unread,
Jul 21, 2016, 4:54:06 AM7/21/16
to orient-...@googlegroups.com
Hi Luca,
Just read the issue, I was wrong, that is exactly the same. 

Eric Lenington

unread,
Jul 21, 2016, 10:56:50 AM7/21/16
to OrientDB
@Luca: How does it help that it used to exist in LOCAL storage? What I'm looking for is a class in PLOCAL that works in every way the same as any other class (specifically including replication), but is guaranteed to be 100% in memory and has the option of being persisted to disk or not.
--Eric


--

---
You received this message because you are subscribed to a topic in the Google Groups "OrientDB" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/orient-database/_xwbdw55_IM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to orient-databa...@googlegroups.com.

Luca Garulli

unread,
Jul 21, 2016, 12:31:35 PM7/21/16
to OrientDB
@Eric, doesn't help, it was funny that we had this feature with the old LOCAL storage engine.

Anyway, even if implementing this should be quite trivial, Andrey could have a better idea about how to do that.

Best Regards,

Luca Garulli
Founder & CEO


Eric Lenington

unread,
Jul 21, 2016, 12:34:09 PM7/21/16
to OrientDB
@Luca, I was looking for some old docs on how this was configured with LOCAL, but I couldn't find anything. Do you have a link by any chance?
Reply all
Reply to author
Forward
0 new messages