The Differences of Xen and OpenVZ

This article is to provide a little insight into the difference between OpenVZ and Xen, two very popular but somewhat different virtualization technologies. Ultimately, as with choosing between a Linux or Windows server, you will need to think about the applications you will be running to decide whether OpenVZ or Xen will be a better fit for them. Below is a brief overview of some of the key differences between these two platforms.

The slightly more reliable virtualization software is Xen, a para-virtualization platform that creates VPS with almost exactly the same characteristics as dedicated servers. A Xen VPS will run its own isolated kernel, load its own kernel modules, use fully dedicated virtualized memory, I/O and scheduler, and will be just as stable and customizable as a dedicated server. For a small premium, you’ll never know that you’re only using a virtual server.

OpenVZ, on the other hand, is an operating-system-level virtualization platform that works in much the same way, but provides only a thin layer of virtualization on top of the underlying OS. All VPS on an OpenVZ node will share the same core Linux kernel–this is why OpenVZ only supports Linux systems–, and, consequently, will also suffer alike from issues like kernel crashes. Despite these small drawbacks, OpenVZ VPS are more cost-effective, easier to understand, and are usually much more effective than Xen as cheap VPS, due to having the extra resources available that a Xen VPS would be using to run its completely isolated environment.

Certainly, these are not the only differences between the two platforms, but they are some of the most significant:

Main Features of OpenVZ Virtualization:
Full root access.
OS-level virtualization.
‘Burst’ RAM and other extra resources available when nodes are underused.
Upgrades can be applied on-the-fly, without reboots.
More resources available due to lightweight virtualization.
Simple network and disk setup.
Access to most iptables modules.

Main Features of Xen Virtualization:
Full root access.
Supports Linux and Windows.
Better Java performance.
Resources (RAM, etc) are fully dedicated and private.
Para-virtualized Linux kernel (i.e., full isolation).
Direct access to loadable kernel modules.
Swap space.
Highly configurable.

If you are unsure which platform would be better for you, an OpenVZ VPS will most likely be an easier and more cost-effective solution, unless you already know that you will require specific kernel modules that OpenVZ does not support.


VPS Hosting Service provided by HaBangNet –

XEN VPS Hosting offer –

West coast datacenters with good connectivity to mainland China?

This is a wrong idea. As people outside China, do not aware how China ISP work.

Whether you sign-up for a west coast or any other location server in USA, the speed to China make no different, especially during mid to end of each month, China ISP connection to USA speed even more slower than in the begining of the month. This is a serious problem that happen to every internet users in China. Before China government pushing the local ISP to increase speed and reduce cost for every home user connection to increase the users for Internet Connection in China, the speed for international bandwdith still ok, but after all ISP in China, increase the speed to 50M or 100M internet connection (You can only get this speed if the server was hosted in China), but reduce the speed to international bandwidth (outside China network). Which mean, if your server is located inside China, the internet users can get full speed, but if your server was outside China, max connection to the outside China network, the speed is only from 1Mbps to 2Mbps, sometime during perk hours, I think even 1Mbps also can’t get. So make no different which part of USA server you get, even if the provider got so called “China direct bandwidth” or “Asian Optimized bandwidth”, doesn’t mean you speed will be good.

So if you really want to have good speed to China, Hong Kong will be the best selection than any other country. If not, best option will be using a China Hosting.

If you got staff in China, why not get a China server directly, filling for ICP is very simple and fast, although the ICP department mention is approval within 21 working days, but at most case, the ICP number is provided within 3-7 working days. As long as your china staff is local with China National ID (exclude Taiwan and Hong Kong), then there is no problem applying for the ICP. For the further requirement, will base on your staff National ID issued from which part of the China province, as different Province ICP Department in China, got different requirement. eg. if your office is in Beijing but company registered in Shenzhen, your ICP department will need to be in Shenzhen ICP department handle it and not Beijing ICP department. And if filling under personal and not under company, the process is the same, only thing for Company filling, require company registered detail and a copy of the registered certificate in China (exclude Taiwan and Hong Kong is not allowed).

Don’t listen to people mention so called “China direct bandwidth” or “Asian Optimized bandwidth”. It just a marketing or sales static for people who do not understand about China Internet Network.

FTP Connection Error : Error loading directory?

We notice, since the latest cpanel update, there is a number of people using VPS or Dedicated Server with cPanel encounter this issue.

Please follow these step to solve it, if you’re a managed VPS or Server with HaBangNet, please submit a ticket to support. And we will fix it for you.

What is described looks like the customer is using passive-mode FTP and a port range is not open in the firewall to match the port range used by the FTP service. There are two options to fix this:

  • Use active-mode FTP instead of passive. This is normally selectable in the FTP client. In the command-line FTP client, you can simply type “passive” to toggle passive/active mode.
  • Configure a port range for passive-mode FTP in the FTP service configuration, and configure the server’s firewall to match.

The second option has been covered extensively in this forum, as it is a very common issue. I found the following threads that should help:

If you are using Pure-FTPd, which is the default, you can define the passive-mode port range by editing /etc/pure-ftpd.conf and uncommenting the following directive:

# Port range for passive connections replies. - for firewalling.

# PassivePortRange          30000 50000

Once you have removed the hash mark (#) from the line starting with “PassivePortRange”, restart Pure-FTPd and edit your firewall configuration to allow traffic on the same port range.


Guide bought to you by HaBangNet – Global Web Hosting Service

Seattle, WA Network Added

Hong Kong, May 3, 2016, HaBangNet, a privately held Web Hosting Provider that specializes in dedicated server and cloud based virtualization applications, today announced that it has expansion our Web Hosting Location to Seattle, Washington Network. The new expansion datacenter, that HaBangNet using for the expansion is WOW Datacenter. The facility will help HaBangNet continue to meet the growing demand for high quality dedicated, cloud infrastructure and Enterprise Disaster Recovery services out of multiple geographical locations within the United States Market. And this making HaBangNet almost cover whole United States Datacenter Network.

The new datacenter located in the heart of WOW Seattle, WA Datacenter, further executes HaBangNet’s 2016 mission to expand operations to a global presence to meet the always changing demands of it’s Enterprise customer base.

More detail about our Web Hosting Service, visit

Speed test our Network can be located at

5 commands to check memory usage on Linux

Memory Usage

On linux, there are commands for almost everything, because the gui might not be always available. When working on servers only shell access is available and everything has to be done from these commands. So today we shall be checking the commands that can be used to check memory usage on a linux system. Memory include RAM and swap.

It is often important to check memory usage and memory used per process on servers so that resources do not fall short and users are able to access the server. For example a website. If you are running a webserver, then the server must have enough memory to serve the visitors to the site. If not, the site would become very slow or even go down when there is a traffic spike, simply because memory would fall short. Its just like what happens on your desktop PC.

1. free command

The free command is the most simple and easy to use command to check memory usage on linux. Here is a quick example

$ free -m
             total       used       free     shared    buffers     cached
Mem:          7976       6459       1517          0        865       2248
-/+ buffers/cache:       3344       4631
Swap:         1951          0       1951

The m option displays all data in MBs. The total os 7976 MB is the total amount of RAM installed on the system, that is 8GB. The used column shows the amount of RAM that has been used by linux, in this case around 6.4 GB. The output is pretty self explanatory. The catch over here is the cached and buffers column. The second line tells that 4.6 GB is free. This is the free memory in first line added with the buffers and cached amount of memory.

Linux has the habit of caching lots of things for faster performance, so that memory can be freed and used if needed.
The last line is the swap memory, which in this case is lying entirely free.

2. /proc/meminfo

The next way to check memory usage is to read the /proc/meminfo file. Know that the /proc file system does not contain real files. They are rather virtual files that contain dynamic information about the kernel and the system.

$ cat /proc/meminfo
MemTotal:        8167848 kB
MemFree:         1409696 kB
Buffers:          961452 kB
Cached:          2347236 kB
SwapCached:            0 kB
Active:          3124752 kB
Inactive:        2781308 kB
Active(anon):    2603376 kB
Inactive(anon):   309056 kB
Active(file):     521376 kB
Inactive(file):  2472252 kB
Unevictable:        5864 kB
Mlocked:            5880 kB
SwapTotal:       1998844 kB
SwapFree:        1998844 kB
Dirty:              7180 kB
Writeback:             0 kB
AnonPages:       2603272 kB
Mapped:           788380 kB
Shmem:            311596 kB
Slab:             200468 kB
SReclaimable:     151760 kB
SUnreclaim:        48708 kB
KernelStack:        6488 kB
PageTables:        78592 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     6082768 kB
Committed_AS:    9397536 kB
VmallocTotal:   34359738367 kB
VmallocUsed:      420204 kB
VmallocChunk:   34359311104 kB
HardwareCorrupted:     0 kB
AnonHugePages:         0 kB                                                                                                                           
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:       62464 kB
DirectMap2M:     8316928 kB
Global VPS Hosting

Check the values of MemTotal, MemFree, Buffers, Cached, SwapTotal, SwapFree.
They indicate same values of memory usage as the free command.

3. vmstat

The vmstat command with the s option, lays out the memory usage statistics much like the proc command. Here is an example

$ vmstat -s
      8167848 K total memory
      7449376 K used memory
      3423872 K active memory
      3140312 K inactive memory
       718472 K free memory
      1154464 K buffer memory
      2422876 K swap cache
      1998844 K total swap
            0 K used swap
      1998844 K free swap
       392650 non-nice user cpu ticks
         8073 nice user cpu ticks
        83959 system cpu ticks
     10448341 idle cpu ticks
        91904 IO-wait cpu ticks
            0 IRQ cpu ticks
         2189 softirq cpu ticks
            0 stolen cpu ticks
      2042603 pages paged in
      2614057 pages paged out
            0 pages swapped in
            0 pages swapped out
     42301605 interrupts
     94581566 CPU context switches
   1382755972 boot time
         8567 forks

The top few lines indicate total memory, free memory etc and so on.

4. top command

The top command is generally used to check memory and cpu usage per process. However it also reports total memory usage and can be used to monitor the total RAM usage. The header on output has the required information. Here is a sample output

top - 15:20:30 up  6:57,  5 users,  load average: 0.64, 0.44, 0.33
Tasks: 265 total,   1 running, 263 sleeping,   0 stopped,   1 zombie
%Cpu(s):  7.8 us,  2.4 sy,  0.0 ni, 88.9 id,  0.9 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem:   8167848 total,  6642360 used,  1525488 free,  1026876 buffers
KiB Swap:  1998844 total,        0 used,  1998844 free,  2138148 cached

  PID USER      PR  NI  VIRT  RES  SHR S  %CPU %MEM    TIME+  COMMAND                                                                                 
 2986 enlighte  20   0  584m  42m  26m S  14.3  0.5   0:44.27 yakuake                                                                                 
 1305 root      20   0  448m  68m  39m S   5.0  0.9   3:33.98 Xorg                                                                                    
 7701 enlighte  20   0  424m  17m  10m S   4.0  0.2   0:00.12 kio_thumbnail

Check the KiB Mem and KiB Swap lines on the header. They indicate total, used and free amounts of the memory. The buffer and cache information is present here too, like the free command.

5. htop

Similar to the top command, the htop command also shows memory usage along with various other details.


The header on top shows cpu usage along with RAM and swap usage with the corresponding figures.

RAM Information

To find out hardware information about the installed RAM, use the demidecode command. It reports lots of information about the installed RAM memory.

$ sudo dmidecode -t 17
# dmidecode 2.11
SMBIOS 2.4 present.

Handle 0x0015, DMI type 17, 27 bytes
Memory Device
        Array Handle: 0x0014
        Error Information Handle: Not Provided
        Total Width: 64 bits
        Data Width: 64 bits
        Size: 2048 MB
        Form Factor: DIMM
        Set: None
        Locator: J1MY
        Bank Locator: CHAN A DIMM 0
        Type: DDR2
        Type Detail: Synchronous
        Speed: 667 MHz
        Manufacturer: 0xFF00000000000000
        Serial Number: 0xFFFFFFFF
        Asset Tag: Unknown
        Part Number: 0x524D32474235383443412D36344643FFFFFF

Provided information includes the size (2048MB), type (DDR2) , speed(667 Mhz) etc.


All the above mentioned commands work from the terminal and do not have a gui. When working on a desktop with a gui, it is much easier to use a GUI tool with graphical output. The most common tools are gnome-system-monitor on gnome and ksysguard on KDE. Both provide resource usage information about cpu, ram, swap and network bandwidth in a graphical and easy to understand visual output.

CentOS Web Panel – Installation

HaBangNet Shared Hosting

Now you are ready to start CWP Installation
CWP installer can run more than 30 minutes, because it needs to compile apache and php from source.

We have CWP installation with default CentOS MySQL version 5.1 and the latest MariaDB as additional option.

Installer with MySQL version 5.1

cd /usr/local/src
sh cwp-latest

Installer with MARIA-DB 10.1.10

cd /usr/local/src
sh cwp-latest -d mariadb

If download link doesn’t work then you can use the following:

Reboot Server
Reboot your server so that all updates can take affect and to start CWP.


HaBangNet Global DNS

This dns is only available for customer using our service. And not open for public use.

  1. (Fast Loading in USA Location)
  2. (Fast Loading in USA Location)
  3. (Fast Loading in Asia Location)
  4. (Fast Loading in Europe Location)
  5. (Fast Loading in Europe Location)

Our DNS is build from cloud base network with 100% Network Uptime. With internal anycast setup for best routing and pointing in Geolocation detect.

If you hosted with us, you can use the dns setting for your domain name server pointing for result worldwide.

Free & Public DNS Servers

Global VPS Hosting

Your ISP automatically assigns DNS servers when your router or computer connects to the Internet via DHCP… but you don’t have to use those.

Below are free DNS servers you can use instead of the ones assigned, the best and most reliable of which, from the likes of Google and OpenDNS, you can find below:

Free & Public DNS Servers (Valid March 2016)

Provider Primary DNS Server Secondary DNS Server
Comodo Secure DNS
OpenDNS Home5
DNS Advantage
Norton ConnectSafe6
Alternate DNS11
Hurricane Electric14

Note: Primary DNS servers are sometimes called preferred DNS servers and secondary DNS servers are sometimes called alternate DNS servers. Primary and secondary DNS servers can be “mixed and matched” to provide another layer of redundancy.

Why Use Different DNS Servers?

One reason you might want to change from the DNS servers assigned by your ISP is if you suspect there’s a problem with the ones you’re using now.