This message was deleted.
# community-help
s
This message was deleted.
k
The Typesense server instance is close to running out of system memory.
s
mm
i dont get it
I was able to make the same change on the development cluster
which has the same docs in it
and the same collections/ memory etc
k
DM me the cluster ID
s
Done
k
The prod cluster is using 261M of RAM and 192M of swap space to a total of 452M which is very close to total available memory. So writes are throttled. Dev is at similar memory usage but the actual usage can differ slightly instance to instance based on cache used during searching etc.
s
gotcha
as I think they would basically be using the same memory for actual docs
as they have the same data in them
Is there any thing to optimise /change or if we wait the swap will decrease when reclaiming memory?
all I want to do is add another field
k
No you have to either upsize or delete some documents / fields to make room.
s
ok got it
question, for example the field we adding,
userId
if we just want to do exact match on that ID being found, we would need to have
facet:true
on it? Or
facet:false
will still be ok ?
k
You want to use it during filtering?
You don't need to enable facet for that
s
ok got it
so I think we could optimise the current schemas then
we have currently for each collection,
facet:true
for like
verified
and
deleted
flags
Would these just be fine with facet:false
they are just bool fields
which we would filter such as
deleted=false
etc
k
Yeah no need facet for that
s
ah ok nice
so that should decrease the mem usage making those changes I would expect ?
k
Yes
s
nice
Will make those changes and see
otherwise will increase memory size
of cluster
Even when updated to
Copy code
{
  "facet": false,
  "index": true,
  "infix": false,
  "locale": "",
  "name": "deleted",
  "optional": false,
  "sort": false,
  "type": "bool"
}
They still have index:true
is that fine ?
/ expected
k
That's fine
s
ok cool
thanks
Does
sort:true
make much difference to memory usage? I take it that if this is false you cant sort by that field, except it seems to make it true by default for all fields
k
Usually with numerical fields people want to be able to sort so we enable it by default.
But you can disable if you don't need it.
s
got it
I guess bool is just treated as numeric under the hood
as 0/1
as those all get it by default
k
Yes
s
it wont make much diff on memory for bool fields? so safe to just leave it on as default ?
Or for other int32 fields for example
k
Don't enable sorting if it's not needed. Every type of index does use memory.
s
Ok got it
makes sense
thanks
g