ram

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

不羁岁月 提交于 2019-11-27 07:26:21
is it possible, in C++, to get the current RAM and CPU usage? Is there a platform-indepentent function call? There is an open source library that gives these (and more system info stuff) across many platforms: SIGAR API I've used it in fairly large projects and it works fine (except for certain corner cases on OS X etc.) Sadly these things rely heavily on the underlying OS, so there are no platform-independent calls. (Maybe there are some wrapper frameworks, but I don't know of any.) On Linux you could have a look at the getrusage() function call, on Windows you can use GetProcessMemoryInfo()

How are the gather instructions in AVX2 implemented?

岁酱吖の 提交于 2019-11-27 05:36:30
问题 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 implemented as a hardware loop which fetches cache-lines one by one? Or, can it issue a load to multiple cache-lines at once? I read a couple of papers which state the former (and that's the one which makes more sense to me), but I would like to know a bit more about this. Link to one paper: http:/

get server ram with php

夙愿已清 提交于 2019-11-27 05:28:18
问题 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 machine, for the particular server (even if that memory is shared). 回答1: If you know this code will only be running under Linux, you can use the special /proc/meminfo file to get information about the system's virtual memory subsystem. The file has a form like this: MemTotal: 255908 kB MemFree:

How to see top processes sorted by actual memory usage?

家住魔仙堡 提交于 2019-11-27 04:56:00
问题 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 12979 frank 20 0 206m 21m 12m S 11 0.2 26667:24 krfb 13 root 15 -5 0 0 0 S 1 0.0 36:25.04 ksoftirqd/3 59 root 15 -5 0 0 0 S 0 0.0 4:53.00 ata/2 2155 root 20 0 662m 37m 8364 S 0 0.3 338:10.25 Xorg 4560 frank 20 0 8672 1300 852 R 0 0.0 0:00.03 top 12981 frank 20 0 987m 27m 15m S 0 0.2 45:10.82 amarok 24908 frank 20 0 16648 708 548 S 0 0.0 2:08.84 wrapper 1 root 20 0 8072

Data size in memory vs. on disk

纵饮孤独 提交于 2019-11-27 04:52:31
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 billion floating point values. Stored in binary form, that'd be 4 billion bytes or 3.7GB on disk (not including headers and such). Then say I read those values into a list in Python... how much RAM should I expect that to require? Python Object Data Size If the data is stored in some python object, there will be a little more data attached to the actual data in memory. This may be easily tested. It is

What are the differences between virtual memory and physical memory?

99封情书 提交于 2019-11-27 02:34:53
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 memory stand when the process (program) from the external hard drive is brought to the main memory (physical memory) for the execution. Who takes care of the virtual memory and what is the size of the virtual memory? Suppose if the size of the RAM is 4GB (i.e. 2^32-1 address spaces) what is the size of the virtual memory? Virtual memory is, among other things, an abstraction to give the programmer

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

萝らか妹 提交于 2019-11-27 01:33:20
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . 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 2005 x64 just grabs everything it can, so this might be normal (???). How can I check how much memory it is actually

Detect CPU Speed/Memory/Internet Speed using Java?

妖精的绣舞 提交于 2019-11-26 23:35:18
问题 Is it possible within Java to identify the total CPU speed available as well as the total system memory? Network connection speed to the web would also be awesome. 回答1: This really depends on your OS, since Java will tell you little about the underlying machine. Unfortunately you have to use differing approaches depending on your OS. If you're on Linux, take a look at the /proc/cpuinfo filesystem for CPU info. /proc generally has a wealth of information. Network (IO) will be reflected via the

How to get CPU usage and RAM usage without exec?

六眼飞鱼酱① 提交于 2019-11-26 21:51:32
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/usage/count RAM usage Use PHPSysInfo library phpSysInfo is a open source PHP script that displays information about the host being accessed. It will displays things like: Uptime CPU Memory SCSI, IDE, PCI Ethernet Floppy Video Information It directly parsed parses /proc and does not use exec . Another way is to use Linfo . It is a very fast cross-platform php script that describes the host server

RAM & ROM

廉价感情. 提交于 2019-11-26 20:02:44
记录几种 RAM 和 ROM 的区别: 先说RAM吧!! 由字面意思就可以理解,SDRAM SRAM DRAM都可以统称RAM,random access memory的缩写,只是前面加了几个修饰词而已。 SRAM:   静态随机存储器,就是它不需要刷新电路,不像动态随机存储器那样,每隔一段时间就要刷新一次数据。但是他集成度比较低,不适合做容量大的内存,一般是用在处理器的缓存里面。像S3C2440的ARM9处理器里面就有4K的SRAM用来做CPU启动时用的。 SDRAM:   同步动态随机存储器,像电脑的内存就是用的这种RAM叫DDR SDRAM。其集成度非常高,因为是动态的,所以必须有刷新电路,每隔一段时间必须得刷新数据。其存储单元不是按线性排列的,是分页的。一般的嵌入式产品里面的内存都是用的SDRAM。 DRAM:   动态随机存储器,SDRAM只是其中的一种吧,没用过,不怎么清楚。 ROM :只读存储器的总称。 PROM:   可编程只读存储器,只能写一次,写错了就得报废,现在用得很少了,好像那些成本比较低的OPT单片机里面用的就是这种存储器吧。 EPROM:   可擦除可编程存储器,这东西也比较古老了,是EEPROM的前身,在芯片的上面有个窗口,通过紫外线的照射来擦除数据。非常之麻烦。 EEPROM: 电可擦除可编程只读存储器,比之EPROM就先进点了