Memory footprint for Redis empty instance - redis

I've been investigating about the memory footprint usage of a Redis empty instance (because I'm interested by enabling Redis as cache provider in a low-ram device).
The documentation says that the memory footprint should be ~3MB (previous versions were only 1MB but I suppose that new features should have been increased this size).
I've tested Redis 4.0.0 (just released!) using Docker three official containers (https://hub.docker.com/_/redis/): Debian with Redis 32 and 64 bits, and Alpine (Redis 64 bits).
The results are:
Debian with Redis 32 bits:
gcc_version:4.9.2
used_memory_rss_human:3.40M
Debian with Redis 64 bits:
gcc_version:4.9.2
used_memory_rss_human:3.84M
Alpine Redis 64 bits:
gcc_version:6.3.0
used_memory_rss_human:2.11M
The documentation states that 32 bit instances have lower consumption of memory . It is consistent with the difference between 32bit and 64bit debian instances but not with the alpine version.
Is the gcc version the responsible to have lower footprint in the alpine instance than the debian instance?
Thanks in advance

No, the difference probably comes from the runtime libraries (ie. glibc or musl). It makes a bigger difference than 32 bits vs 64 bits when the instance is empty (but probably not when you have some data).

Related

Invalid maximum heap size

I have copied a jdk directory from another location. Since then, I get the following error message.
Your environment has been set.
java version "1.5.0_22"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_22-b03)
Java HotSpot(TM) Client VM (build 1.5.0_22-b03, mixed mode, sharing)
PROPS=-Xms1024m -Xmx5096m -Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl -Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl -Djava.ext.dirs=..;.;..\lib;..\classes -Dfile.encoding=UTF-8
CLASSPATH=C:\Oracle\MIDDLE~1\patch_wls1211\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\PROGRA~1\Java\JDK15~1.0_2\lib\tools.jar;C:\Oracle\MIDDLE~1\WLSERV~1.1\server\lib\weblogic_sp.jar;C:\Oracle\MIDDLE~1\WLSERV~1.1\server\lib\weblogic.jar;C:\Oracle\MIDDLE~1\modules\features\weblogic.server.modules_12.1.1.0.jar;C:\Oracle\MIDDLE~1\WLSERV~1.1\server\lib\webservices.jar;C:\Oracle\MIDDLE~1\modules\ORGAPA~1.1/lib/ant-all.jar;C:\Oracle\MIDDLE~1\modules\NETSFA~1.0_1/lib/ant-contrib.jar;
Invalid maximum heap size: -Xmx5096m
The specified size exceeds the maximum representable size.
Could not create the Java virtual machine.
Does this mean I will have to re-install the jdk, and not just copy any installation directory? I'm asking this and not trying it out myself because this exercise will have to be done in a client machine.
The current machine is a Windows 2008 server and has 12GB of RAM.
You are using 32 bit VM (Java HotSpot(TM) Client VM) which can be mapped to maximum 4G (Only 2 GB in reality) 2^32 address locations Maximum Java heap size of a 32-bit JVM on a 64-bit OS
Error message suggest you are using 5GB heap memory which is not supported on 32 bit architecture
Invalid maximum heap size: -Xmx5096m
The specified size exceeds the maximum representable size.
Could not create the Java virtual machine.
You can modify the -Xmx parameter to use anythinng <=2g should work here
I just encountered the problem and solved it by downloading the windows 64-bit JAVA.
Please check whether your windows version is 32-bit or 64-bit, and download the right version of JAVA.

jBoss slowness in a VMWare ESXI Virtual Machine

We have a Java EE application that runs in JBoss 7.1.1, and, we must run it in VirtualMachines (such as VMWare ESXI).
The thing is, when we run our app in the VM, the performance is dropped by 50% approx.
Seems like the GC goes crazy... as far I can tell, when GC runs, it take much more longer
than normal to "end", and block the application meanwhile.
Have anyone else had a experience like that? Any tips, tunning or a light that I can follow?
Thanks in advance.
EDIT
JVM has Xmx and Xms = 1Gb
VM has 4Gb RAM
Ubuntu Server 64
oracle JVM 64
I would say that before moving your app to VM with configuration you posted it was running on 32bit system and 32bit jvm and using same jvm parameters.
Trick is that you moved to 64bit with 64bit java but still assigned same amount of heap size for your application, what has happened in reality is that you app now has half the memory available that it used to have.
Every object on 64bit jvm is twice the size of the one of 32bit jvm.
Given configuration you have I would suggest few solutions:
increase heap size to 2G
or use compressed oops
or install 32bit jvm
Given that your application does not have more than 1.3G assigned it think best performance would be achieved by installing 32bit jvm and running with -Xms1300m -Xmx1300m.
You can go even step futher and have 32bit VM with 32bit linux installation.
64bit jvm is only useful if you need more than 1.3G of heap otherwise it just adds too much overhead.
Also you can run jvm with
-verbose:gc -XX:+PrintGCDetails
that will show you what is happening with GC, this can further help you tune your jvm.

How to set up a really big JVM heap size?

According to the JVM 6 documentation, server class machines receive by default an initial heap size as 1/4 RAM or 1GB. Considering our Solaris 64Bit server has 64 GB, the initial heap size will default in as 256MB. Therefore, I need to set manually the heap size using the XMX parameter for 4GB. Though, when I add "-Xmx4096M", Tomcat does not start. Here is the error message:
Invalid maximum heap size: -Xmx4096M
The specified size exceeds the maximum representable size.
Could not create the Java virtual machine.
What should be my command line parameters to allow my heap to grow up to 4GB?
Thanks for all your input, guys! Though, the output of my java -version mentions mixed mode which means that it is 64 bits. The real solution is adding -d64 to force it to run in 64 bits and therefore allocate the 4GBs.
My solution based on the comments to the question: you are using 32bit JVM therefore it can't address more than 4GB (non inclusive). Try installing the 64 bit version
According to the output of java -version, a 32 bit JVM is installed. If it was a 64bit one, you should get something like Java HotSpot(TM) 64-Bit Server VM.
Try installing a 64 bits JVM and it will solve your issue.
Use -Xmx1024M -XX:MaxPermSize=256M

Is it possible to virtualize 32-bit environment on Hyper V (x64)?

I'm planning a test environment in several platforms include both 32/64 bits but I'm not sure about the hardware 32 bit could be virtualize through HyperV or not?
SUre it can. Hyper-V simulates a 64 bit environment. You can install a 32 bit operating system on a 64 bit processor, or? ;) I did not see any 32 bit normal processor (outside some low poewer stuff) in the last years.

install mono manual (local) without internet

I want to install mono on an embedded system (arm board) it has no ethernet connection, so i need to do a local installation, (i can transfer data / files to the board with sdcard).
Board Data:
32 Kbytes of Internal ROM
64 Kbyte of Internal SRAM
64 Mbytes of SDRAM memory (32-bit bus width)
256 Mbytes of NAND Flash memory (8-bit bus width)
(edit: OS is a busybox 1.12 buildroot)
(edit2: got now a debian grip chroot)
Any ideas how i can get a mono environment to work on the board?
best regards
You can just use a cross-compiler or do the build on another more powerful ARM development box, then you make install to a, say, /tmp/arm-install directory and then finally transfer the contents of that dir to the ARM box in the final installation dir.