Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Memory Use in array
#11
Maybe it's a xyproblem.
Why do you need everything in memory?
Why does your query have no filter nor limit?
What do you want to do with the data?
Can you do this in a iterative way?
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
Reply
#12
(Jan-28-2020, 09:31 PM)DeaD_EyE Wrote: Maybe it's a xyproblem.
Why do you need everything in memory?
Why does your query have no filter nor limit?
What do you want to do with the data?
Can you do this in a iterative way?

Just how the product works. KeyValue keystore.
So the idea here is to fetch all the keys (this is just the address of the data set) so its the ~1.5GB of the 50GB real dataset.
You push that 1.5Gb of keys into an array.
Then splice/chunk that array into (n) smaller arrays.
You then process those array's in parallel using something like numpy.

This way to you (for example) do 5000 OPS/sec updates instead of 50.

The limiting factor here is the memory. Not understanding why the array blows out to many GB - when your only fetching the KEY and not the data.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How do I get memory consumed by each item in the array? Bhavika 2 2,094 May-24-2020, 06:09 PM
Last Post: Bhavika
  What work faster and take less memory array or class? Kamilbek 1 3,122 Apr-20-2017, 05:32 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020