1

Testing gwan_linux32-bit (4.3.14) on a Digital Ocean VPS instance results in the CPU being maxed even when there are no http requests. The VPS instance has 1 core and 512 MB, running 32 bit CentOS 6.5. Below is some info about the CPU and kernel, and the gwan.log contents can be seen at http://pastebin.com/2UUeGRxn

When gwan is running (whether by ./gwan, or ./gwan -d, or ./gwan -d -w 1) , I can browse the provided sample pages/servlets with no apparent problems and the system appears to be stable. However, when I ssh into the vps, it is obvious that the CPU is maxed out. Observed load is between 2 and 3, the CPU is at 95% on average, and everything is sloooow in my terminal session.

I'd really like to run gwan, but this issue makes it a no-go for now. Is this purely a result of running under the KVM hypervisor? When might this issue be fixed?

$ uname -a
Linux 2.6.32-431.1.2.0.1.el6.i686 #1 SMP Fri Dec 13 11:45:23 UTC 2013 i686 i686 i386 GNU/Linux
$ cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 2
model name      : QEMU Virtual CPU version 1.0
stepping        : 3
cpu MHz         : 2299.996
cache size      : 4096 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 4
wp              : yes
flags           : fpu de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pse36 clflush mmx fxsr sse sse2 syscall nx lm up unfair_spinlock pni vmx cx16 popcnt hypervisor lahf_lm
bogomips        : 4599.99
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management:
Bill
  • 11
  • 1
  • So what is using the CPU? – Michael Hampton Mar 20 '14 at 12:30
  • "I'd really like to run gwan" <-- Nobody wants to run that #*&%. It's forced on them by clueless management who were sold on the buzzwords and empty promises of the websites/sales team. If you have any choice in the matter run something else: Apache, nginx, Lighttpd, Cherokee, or even one of the little crazy ones like thttpd; or proprietary software like IIS and Zeus. – Chris S Mar 24 '14 at 19:25
  • IIS and Zeus <- who runs that #*&%? – hookenz Feb 19 '15 at 20:16

1 Answers1

2

The reason for this to happen comes from the fact that your virtualized environment has 287.62 MiB RAM free.

This old release of G-WAN was not tuned for hypervisors (virtualization) and this leaded to an infinite loop in the memory manager (which assumed AMD64 servers would have more than 1 GB RAM).

To resolve your problem you can either allocate 1 GB RAM (or more) for your VM instance or use G-WAN v4.10+ which was optimized for embedded machines and virtualized environments.

NOTE: The system configuration changes (limit increases, etc.) described on the page at the virtualized environments link are also confirmed as improving performance and reducing CPU usage on non-virtual hosts running CentOS 6.5, and possibly others.

Gil
  • 307
  • 3
  • 12