CherryPy Memory Usage: Mac vs Ubuntu - cherrypy

I am deploying a fairly heavy app through cherrypy (15.0.0). I am developing it on MacOS (anaconda python2.7.15) and deploying it on Ubuntu 18.04LTS (python 2.7.15c1). The differences in memory handling I am observing through htop are confusing me, though:
Mac: 108G (VIRT), 2700M (RES) and only one thread visible
Ubuntu: 8888M (VIRT), 4758M (RES) and more than 60 visible threads (most are dormant).
I would like to get Mac-like memory usage on deployment, but can't figure out what is causing the huge difference...

Related

A sharp increase in the number of threads when executing a program Net.Core on Debian OS

Good afternoon.
There is a program (console) written in Net.Core 3.1.
On Windows OS it works fine, on a test machine with Linux Debian OS, it also works fine, but on a customer machine with Linux Debian OS, the following problematic situation occurs:
There is a constant growth of threads, for example, + 10 threads every minute and after a few hours the number of threads exceeds several thousand (for example, 6000) and after that the program freezes and tries to restart, and falls.
Question:
In which direction to look for the cause of this situation, in the settings of the virtual machine and Debian Linux, or in the peculiarities of working with Net.Core 3.1 in Linux?

android emulator low performance with multicore cpus on linux server

when I start the emulator I get a message:
emulator: WARNING: Not all modern X86 virtualization features supported, which introduces problems with slowdown when running Android on multicore vCPUs. Setting AVD to run with 1 vCPU core only.
the server is quite productive, has 6 cores with 2 threads. Sufficient amount of RAM.
I installed everything necessary on the similarity of kvm and etc.
I use intel-atom-x86 os27api.
But this message still doesn't disappear. And this seems to have a strong impact on the performance of emulators.
And the load average in top rises above 12.0
the ci structure is constructed as follows:
gitlab-runner { docker { project, android-sdk+emulator } }
I understand that need to limit the use of only one core for one emulator.
Is there any way to solve this?
P.S. emulators run and work, but CI tests often crash. (everything is fine locally on the computer).
running 3 emulators
I was able to reduce the server load by specifying --device when creating the emulator.
I use — 5.4in FWVGA
for all 4 emulators. And after that, load Average I stable get a value of 4-6, instead of 12 as before.
The warning didn't disappear.
This is enough for me) but I also look forward to any suggestions for solving the problem.

QNX: Detect memory leak in program

For: QNX Software Development Platform 6.5.0
I have run into a problem on a QNX 6.5.0 system where my program silently exists, and has been found to be due to a race condition similar to this post here:
Thread stops randomly in the middle of a while loop
I have done some research and found that QNX has some built in tools to monitor memory and detect any leaks that are present in the program, however the instructions I have come across are for the QNX 6.5.0 IDE GUI, and I am running QNX on a server in command line.
example: http://www.qnx.com/developers/docs/6.5.0/index.jsp?topic=%2Fcom.qnx.doc.ide.userguide%2Ftopic%2Fmemory_DetecMemLeaks_.html
I'm kind of stuck with this as there isn't really a simple way to do this as the software designed is for logging purposes and is taking thousands of entries per second, and silently exists after a few hours. So I can't sit here waiting 2 hours each round.
Has anyone had experience with debugging mem leaks in QNX?
Edit: I am also using boost::lockfree::spsc_queue which may be causing the crash.
I was able to solve this by utilising Valgrind. I compiled my program and valgrind for linux and was able to debug my issue this way.

Run PyCharm with more memory limit

I have problems running PyCharm with bigger memory size on Linux Mint Sylvia 18.3. I have a script that requires a lot of memory and pycharm does only allow to edit this via config file.
Example:
https://superuser.com/questions/919204/how-can-i-increase-the-memory-heap-in-pycharm
Problem is that I have PyCharm installed via snap, and snap installations are monted as RO file systems and I can not edit that config. Is there any easy way around this?
Also tried this remounting but does not seem to work for me:
https://askubuntu.com/questions/47538/how-to-make-read-only-file-system-writable
For anyone coming across this in 2023, PyCharm now allows to configure the Memory Heap using the UI: https://www.jetbrains.com/help/pycharm/increasing-memory-heap.html

Node.js 0.10.18 bug?

I have the Node.js (0.10.18) the absolutely same big loaded application on a few hosts (Debian 6). Recently, I have noticed that, in contrast of 64-bit version, the 32-bit version has a leak - Open files descriptors (sockets) permanently growing and I have to restart the application every 24 hours. Find below the monitoring data for 32 and 64-bit node.js behavior for same application.
for 32 bit Node
for 64-bit node
Does it node.js bug? Did somebody hit this?
Simon

Resources