I am building a nodejs addon (C and C++) for speech recognition. Every speech request will need approx 30MB of RAM to allocate, acoustic models, language models, etc. I want to know the max of RAM that I am allowed to use.
I am asking this because after the 6th request (in task manager is equivalent +/- of 175,000k) the nodejs automatically exit.
Note: I am using 32bit version of nodejs in windows7 34 bits.
Currently, by default v8 has a memory limit of 512MB on 32-bit systems, and 1.4GB on 64-bit systems. The limit can be raised by setting --max_old_space_size to a maximum of ~1024 (~1 GB) (32-bit) and ~4096 (~4GB) (64-bit), but it is recommended that you split your single process into several workers if you are hitting memory limits.
increasing the memory limit in node.js:
node --max-old-space-size=1024 my-node-script.js #increase to 1gb
node --max-old-space-size=2048 my-node-script.js #increase to 2gb
node --max-old-space-size=3072 my-node-script.js #increase to 3gb
node --max-old-space-size=4096 my-node-script.js #increase to 4gb
node --max-old-space-size=5120 my-node-script.js #increase to 5gb
node --max-old-space-size=6144 my-node-script.js #increase to 6gb
node --max-old-space-size=7168 my-node-script.js #increase to 7gb
node --max-old-space-size=8192 my-node-script.js #increase to 8gb
Related
We have an 64 bit application running on windows, for the fact we know it is leaking very few bytes of memory in the c++ code.But for a setup which has 16gb physical ram and 32gb pagefile.sys. Resource monitor is showing commit memory as 22gb and 900 MB in working set used by our process.
I knew for every process os will create virtual address space in pages and that number of addresses that will be depend on the 32 bit or 64 bit .I also knew that os will swap pages to disk i.e. pagefile.sys for running other apps.In windows i think page size is 4kb, what i want to know is if one byte has leaked in a page of 4 kb in physical ram , then after swapping to disk does it will show as 4kb is used instead of one byte by the process or not ?
I am working on B-L475E-IOT01A2 which is a STM32L475 series Discovery IoT kit and has an ARM M4 cortex. It has two banks of FLASH Memory of size 512 KB each. I am implementing two applications along with a bootloader and all of them are stored in the FLASH. Since there is very little space, the bootloader, the 1st application and some part of the 2nd application is stored in the 1st bank whereas the 2nd bank contains the remaining part of the 2nd application. So at a point in the bootloader program, I need to swap both the applications.
The problem is that only some part of both the applications is getting swapped because the 2nd Application is stored partly in both the banks. Only one page (2 KB) of memory can be written at once in the FLASH . Both the applications have a size of 384 KB and after calculation it turns out to be 192 pages. But after running the swapping program only 72 pages were swapped.
Here are the addresses of the applications and the bootloader.
BOOTLOADER_ADDRESS 0x08000000, (Size = 48K )
APPLICATION1_ADDRESS 0x0800F000 (Size = 384 KB)
APPLICATION2_ADDRESS 0x0806F800 (Size = 384 KB)
So what should I do to ensure proper swapping? Should I enable dual bank mode or store the 2nd Application in the 2nd bank or do something else?
Your help will be highly appreciated.
Thanks,
Shetu
One possible workaround/different approach is to integrate the bootloader functionality into both application 1 and application 2, and having each application in its own flash bank (1 and 2). Using dual bank mode makes switching back and forth between applications much easier. I have used this approach with an STM32F7 device.
When the device boots it is configured to boot from flash bank 1 or 2 depending on several device option bytes/settings. If your code in the bootloader/application decides to boot into the other application, it can do this by modifying some option bytes and then performing a soft reset. Also, while running bootloader/application from one flash bank, the other flash bank can be updated.
If using this approach to do firmware updates, you must be especially careful that new firmware versions do not break the firmware update functionality of the bootloader.
I installed VirtualBox and I want to install Devstack on ubuntu 14.10, this is just for test, So how much should I specify the RAM memory and Memory to use by the VM?
I have a windows 7 with 32 bits
Intel i3
RAM: 4 Go (2.64 Go usable)
27 Go space left on my disk
Thank you very much
If you are doing for testing, these are recommended settings for VM.
Processor - at least 2 cores
Memory - at least 8GB
Hard Drive - at least 60GB
and Use at least 1 GB of RAM but I would suggest to use 2GB RAM to perform well.
Reference: Setup DevStack
See to it that you provide 2 cores and a minimum of 2 GB RAM. Devstack really needs a lot of CPU and still with this 2GB it will crouch a lot.
But basic configurations can still be done with this minimal settings.
I have been running a Python octo.py script to do word counting/author on a series of files. The script works well -- I tried it on a limited set of data and am getting the correct results.
But when I run it on the complete data set it takes forever. I am running on a windows XP laptop with dual core 2.33 GHz and 2 GB RAM.
I opened up my CPU usage and it shows the processors running at 0%-3% of maximum.
What can I do to force Octo.py to utilize more CPU?
Thanks.
As your application isn't very CPU intensive, the slow disk turns out to be the bottleneck. Old 5200 RPM laptop hard drives are very slow, which, in addition to fragmentation and low RAM (which impacts disk caching), make reading very slow. This in turns slows down processing and yields low CPU usage. You can try defragmenting, compressing the input files (as they become smaller in disk size, processing speed will increase) or other means of improving IO.
How can I get the physical size of all hard disks on the current computer using C++ / Qt framework on Windows? Just to be clear, if I have a 640 GB HDD, I want to the application to show 640 GB, not 596 GB of available space.
I know that Qt probably doesn't have a function I could use, because it has to be platform-specific, so I guess in this case something from the Win32 API. Unfortunately I can't use GetDiskFreeSpaceEx(), because I would only get the free/available disk space. I've read about using WMI, but I can't seem to find any usable code examples for this purpose.
I think this issue is mainly cosmetic as a result of inconsistencies in measurements used by Operating Systems and Hard Drive manufacturers. Check this wikipedia page for more information. Perhaps find a way to do the math while treating 1 Kilobyte as 1000 bytes (instead of 1024), 1 Megabyte as 1000 * 1000 and so on -- instead of 1 kilobyte as 1024 bytes etc.