Questions tagged [ram]

RAM (Random Access Memory) is a form of computer data storage. A random access device allows stored data to be accessed in very nearly the same amount of time for any storage location, so data can be accessed quickly in any random order.

ram
Filter by
Sorted by
Tagged with
762 votes
36 answers
214k views

Sorting 1 million 8-decimal-digit numbers with 1 MB of RAM

I have a computer with 1 MB of RAM and no other local storage. I must use it to accept 1 million 8-digit decimal numbers over a TCP connection, sort them, and then send the sorted list out over ...
505 votes
21 answers
699k views

How to get current CPU and RAM usage in Python?

How can I get the current system status (current CPU, RAM, free disk space, etc.) in Python? Ideally, it would work for both Unix and Windows platforms. There seems to be a few possible ways of ...
lpfavreau's user avatar
  • 13k
256 votes
12 answers
551k views

How to see top processes sorted by actual memory usage?

I have a server with 12G of memory. A fragment of top is shown below: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND ...
user3111525's user avatar
  • 5,113
141 votes
6 answers
174k views

What are the differences between virtual memory and physical memory?

I am often confused with the concept of virtualization in operating systems. Considering RAM as the physical memory, why do we need the virtual memory for executing a process? Where does this virtual ...
starkk92's user avatar
  • 5,854
139 votes
6 answers
171k views

Why does VS Code require so much memory? How can I make it run more memory-efficiently?

Does anyone know how to make VS Code use less memory? It´s taking more than 2gb, sometimes more than 3 gigabytes to have some 8 files opened.
Adriel Werlich's user avatar
138 votes
16 answers
278k views

How can I find out the total physical memory (RAM) of my linux box suitable to be parsed by a shell script?

I'm typing a shell script to find out the total physical memory in some RHEL linux boxes. First of all I want to stress that I'm interested in the total physical memory recognized by kernel, not just ...
Jdamian's user avatar
  • 3,035
133 votes
10 answers
116k views

Google Colaboratory: misleading information about its GPU (only 5% RAM available to some users)

update: this question is related to Google Colab's "Notebook settings: Hardware accelerator: GPU". This question was written before the "TPU" option was added. Reading multiple excited announcements ...
stason's user avatar
  • 5,756
126 votes
7 answers
299k views

MySQL maximum memory usage

I would like to know how it is possible to set an upper limit on the amount of memory MySQL uses on a Linux server. Right now, MySQL will keep taking up memory with every new query requested so that ...
user avatar
111 votes
16 answers
292k views

How do I check CPU and Memory Usage in Java?

I need to check CPU and memory usage for the server in java, anyone know how it could be done?
Johnny Bou's user avatar
  • 1,123
92 votes
1 answer
113k views

How does the "number of workers" parameter in PyTorch dataloader actually work?

If num_workers is 2, Does that mean that it will put 2 batches in the RAM and send 1 of them to the GPU or Does it put 3 batches in the RAM then sends 1 of them to the GPU? What does actually happen ...
floyd's user avatar
  • 1,471
74 votes
7 answers
202k views

how much memory can be accessed by a 32 bit machine?

What is meant by 32bit or 64 bit machine? It’s the processor architecture…a 32 bit machine can read and write 32bit data at a time same way with 64 bit machine…. whats the maximum memory that a 32 ...
haris's user avatar
  • 2,033
73 votes
5 answers
280k views

How to delete multiple pandas (python) dataframes from memory to save RAM?

I have lot of dataframes created as part of preprocessing. Since I have limited 6GB ram, I want to delete all the unnecessary dataframes from RAM to avoid running out of memory when running ...
GeorgeOfTheRF's user avatar
51 votes
4 answers
43k views

How to check the amount of RAM

I want to make a function that imports data in different numbers of batches depending on how much RAM is available on someone's system. But how can I find the amount of available RAM in R? I can use ...
Sacha Epskamp's user avatar
51 votes
1 answer
53k views

what's the difference between working set and commit size?

when debugging OOM bugs, what's the difference between working set and commit size? Especially what's the exact meaning for commit size?
user705414's user avatar
  • 20.8k
50 votes
2 answers
29k views

Unmanaged memory and Managed memory

what exactly are un-managed and managed memory? can anybody explain me in brief? Also, what exactly would mean when the managed-memory concept is taken to RAM, calling managed-RAM. What are some of ...
Naruto's user avatar
  • 9,574
47 votes
4 answers
71k views

Limit RAM usage to python program

I'm trying to limit the RAM usage from a Python program to half so it doesn't totally freezes when all the RAM is used, for this I'm using the following code which is not working and my laptop is ...
Ulises CT's user avatar
  • 1,411
42 votes
9 answers
53k views

get server ram with php

Is there a way to know the avaliable ram in a server (linux distro) with php (widthout using linux commands)? edit: sorry, the objective is to be aware of the ram available in the server / virtual ...
yoda's user avatar
  • 10.9k
40 votes
2 answers
37k views

High Java memory usage even for small programs

I have a couple of simple applications written in java, one of them written to act as a widget. What surprised me how much RAM even small applications use. I wrote the following to see if it is a bug ...
Vivo's user avatar
  • 401
38 votes
4 answers
45k views

How can I create a RAM disk programmatically?

I am not looking for a code that invokes a command line utility, which does the trick. I am actually interested to know the API used to create a RAM disk. EDIT Motivation: I have a third party ...
mark's user avatar
  • 60.3k
37 votes
5 answers
42k views

R reading a huge csv

I have a huge csv file. Its size is around 9 gb. I have 16 gb of ram. I followed the advises from the page and implemented them below. If you get the error that R cannot allocate a vector of length ...
user2543622's user avatar
  • 6,228
33 votes
4 answers
44k views

How do you determine the amount of Linux system RAM in C++?

I just wrote the following C++ function to programmatically determine how much RAM a system has installed. It works, but it seems to me that there should be a simpler way to do this. Am I missing ...
Bill the Lizard's user avatar
32 votes
6 answers
50k views

How to get total RAM size of a device?

I want to get full RAM size of a device. memoryInfo.getTotalPss() returns 0. There is not function for get total RAM size in ActivityManager.MemoryInfo. How to do this?
BOOMik's user avatar
  • 423
32 votes
5 answers
56k views

How to get CPU usage and RAM usage without exec?

How does VBulletin get the system information without the use of exec? Is there any other information I can get about the server without exec? I am interested in: bandwidth used system type CPU speed/...
TeAmEr's user avatar
  • 4,733
32 votes
9 answers
55k views

How to get current CPU and RAM usage in C++?

is it possible, in C++, to get the current RAM and CPU usage? Is there a platform-indepentent function call?
tunnuz's user avatar
  • 23.6k
32 votes
3 answers
34k views

How does the internal implementation of memcpy work?

How does the standard C function 'memcpy' work? It has to copy a (large) chunk of RAM to another area in the RAM. Since I know you cannot move straight from RAM to RAM in assembly (with the mov ...
PersonWithName's user avatar
32 votes
1 answer
33k views

How to see Linux' view of the RAM in order to determinate the fragmentation

The only program relevant I know of is pmap, but this only prints the memory of one process. I would like to see how the physical memory is occupied and by which processes/library, including the ...
Flavius's user avatar
  • 13.7k
32 votes
2 answers
27k views

Why is Pandas Concatenation (pandas.concat) so Memory Inefficient?

I have about 30 GB of data (in a list of about 900 dataframes) that I am attempting to concatenate together. The machine I am working with is a moderately powerful Linux Box with about 256 GB of ram. ...
sfortney's user avatar
  • 2,083
30 votes
4 answers
8k views

How does random access memory work? Why is it constant-time random-access?

Or in other words, why does accessing an arbitrary element in an array take constant time (instead of O(n) or some other time)? I googled my heart out looking for an answer to this and did not find a ...
Kacy's user avatar
  • 3,370
27 votes
2 answers
12k views

Redis: Database Size to Memory Ratio?

What is Redis's database size to memory ratio? For instance, if I have an 80MB database, how much RAM will Redis use (when used with a normal web app)?
Philip Wernersbach's user avatar
26 votes
2 answers
10k views

How are the gather instructions in AVX2 implemented?

Suppose I'm using AVX2's VGATHERDPS - this should load 8 single-precision floats using 8 DWORD indices. What happens when the data to be loaded exists in different cache-lines? Is the instruction ...
Anuj Kalia's user avatar
26 votes
7 answers
19k views

Need to load the whole postgreSQL database into the RAM

How do I put my whole PostgreSql database into the RAM for a faster access?? I have 8GB memory and I want to dedicate 2 GB for the DB. I have read about the shared buffers settings but it just caches ...
Bharath's user avatar
  • 623
25 votes
6 answers
21k views

AndroidStudio show usage of RAM

I have seen on other AndroidStudio-pictures, that there is a RAM usage at the right bottom. I tried to setup this statuslist o the bottom. But a rightclick didn`t help me. How can I switch on the RAM ...
noobee's user avatar
  • 383
24 votes
6 answers
155k views

How much RAM is SQL Server actually using? [closed]

I am debugging one of my apps and noticed that the RAM on my SQL Server 2005 x64 box (running on a Windows 2003 R2 x64 ) is pegged and even going into the paging file. I understand that SQL Server ...
AngryHacker's user avatar
  • 60.5k
22 votes
2 answers
22k views

Elastic search high memory consumption

Elastic search is occupying more than 25 GBs of RAM. Data that I gave for indexing to elastic search is around 1 GB. Why elastic search needs this much of space?
ThinkGeek's user avatar
  • 4,897
22 votes
1 answer
69k views

Android memory types (RAM v Internal Memory)

On a separate thread I demonstrated my ignorance of memory types by asking about the best way to copy a file into "internal memory" and was advised that this was not a good idea and that it would be ...
prepbgg's user avatar
  • 3,614
21 votes
3 answers
47k views

How can I add memory to an Azure virtual machine?

Is it possible to add a "custom" size memory to an Azure virtual machine? For example, I'm using the Medium size - 2 core, 4GB RAM, I would like to have 8GB RAM with the current settings I have... ...
Yovav's user avatar
  • 2,627
21 votes
10 answers
11k views

Why are 8 and 256 such important numbers in computer sciences?

I don't know very well about RAM and HDD architecture, or how electronics deals with chunks of memory, but this always triggered my curiosity: Why did we choose to stop at 8 bits for the smallest ...
gokoon's user avatar
  • 1,017
21 votes
3 answers
49k views

Limiting node.js's memory usage

I am trying to limit a node.js application from using to much memory and I've found out about the --max-stack-size & --max_executable_size options that are available within V8 to pass when ...
Industrial's user avatar
  • 42.1k
20 votes
3 answers
43k views

Read file in chunks - RAM-usage, reading strings from binary files

I'd like to understand the difference in RAM-usage of this methods when reading a large file in python. Version 1, found here on stackoverflow: def read_in_chunks(file_object, chunk_size=1024): ...
xph's user avatar
  • 957
19 votes
2 answers
6k views

Data size in memory vs. on disk

How does the RAM required to store data in memory compare to the disk space required to store the same data in a file? Or is there no generalized correlation? For example, say I simply have a ...
Aaron Leinmiller's user avatar
19 votes
3 answers
8k views

Enhanced docker stats command with total amount of RAM and CPU

I just want to share a small script that I made to enhance the docker stats command. I am not sure about the exactitude of this method. Can I assume that the total amount of memory consumed by the ...
Michel L's user avatar
  • 496
18 votes
2 answers
33k views

How to check allocated memory for WSL Docker?

I want to increase allocated RAM for WSL. I have created in my root /users/ .wslconfig. How does it looks: [wsl2] memory=6GB swap=0 localhostForwarding=true I did wsl --shutdown and then started WSL ...
andrew17's user avatar
  • 909
18 votes
1 answer
9k views

Python `open` function memory usage

Does Python interpreter load all the file to RAM when it is opened for writing? with open('file.txt' 'w') as file: file.write(some_content)
I159's user avatar
  • 30.4k
18 votes
1 answer
696 views

We need to preallocate. But MATLAB does not preallocate the preallocation?

While testing if any() short-circuits (it does!) I found out the following interesting behavior when preallocating the test variable: test=zeros(1e7,1); >> tic;any(test);toc Elapsed time is 2....
Ander Biguri's user avatar
  • 35.4k
18 votes
2 answers
6k views

How can I ask windows about if the RAM is running in single, dual or quad channel?

How can I detect the current RAM config? I need to ask windows about if the RAM is currently running in single, dual or quad channel. I have searched a lot, and not found any similar questions on ...
JohnAl's user avatar
  • 1,084
15 votes
19 answers
6k views

Will multi threading provide any performance boost?

I am new to programming in general so please keep that in mind when you answer my question. I have a program that takes a large 3D array (1 billion elements) and sums up elements along the various ...
Faken's user avatar
  • 11.6k
15 votes
3 answers
16k views

php zip archive memory, ram and max file size

I have folders that have user generated images that get rather large. When trying to zip these I am getting errors around 1.5 gig sized zip files. My questions have to do with memory and I think ...
quick_learner42's user avatar
15 votes
3 answers
20k views

How to get application memory usage as shown in Task Manager?

I am trying to get the memory usage of my application but for some reason i am getting different size than in task manager I am using: Task manager shows that my application occupies 45mb , while ...
atikot's user avatar
  • 4,871
15 votes
2 answers
10k views

Why isn't RAM as fast as registers/cache memory? [closed]

Why do we need to cache in Cache Memory? Why cant RAM Memory be made as fast as register or Cache Memory or Cache be as large as RAM Memory (4GB) so that everything can be in cache? Any good article/...
Andy's user avatar
  • 151
14 votes
8 answers
8k views

how to keep c++ variables in RAM securely?

I'm working on a C++ application which is keeping some user secret keys in the RAM. This secret keys are highly sensitive & I must minimize risk of any kind of attack against them. I'm using a ...
Ehsan Khodarahmi's user avatar

1
2 3 4 5
47