Mostrando entradas con la etiqueta Linux. Mostrar todas las entradas
Mostrando entradas con la etiqueta Linux. Mostrar todas las entradas

29 agosto 2013

How to test network performance with Netperf

As we can read at the offcial webpage: "Netperf is a benchmark that can be used to measure the performance of many different types of networking. It provides tests for both unidirecitonal throughput, and end-to-end latency"

It´s so usefull to test network performance between two virtual machines , for example from a database server to the aplicacion client.

First, download Netperf for Linux or Windows O.S and install or unzip it:


    Linux:  http://www.netperf.org/netperf/DownloadNetperf.html

    Windows: https://i18n-zh.googlecode.com/files/NetPerf-2.4.5-w32.zip



See a Windows example:

-Start server side. You can specified a port with -p





-Start client side. With -h you can see all the options.









In this case, we get a test with the result 524,55 Mbit/s (Mbps) between two virtual machines.


The simple test run for 10seconds, but this can be changed to. Netperf -h:

E:\datos\NetPerf-2.4.5-w32>netperf -h

Usage: netperf [global options] -- [test options]

Global options:
    -a send,recv      Set the local send,recv buffer alignment
    -A send,recv      Set the remote send,recv buffer alignment
    -B brandstr       Specify a string to be emitted with brief output
    -c [cpu_rate]     Report local CPU usage
    -C [cpu_rate]     Report remote CPU usage
    -d                Increase debugging output
    -D [secs,units] * Display interim results at least every secs seconds
                      using units as the initial guess for units per second
    -f G|M|K|g|m|k    Set the output units
    -F fill_file      Pre-fill buffers with data from fill_file
    -h                Display this text
    -H name|ip,fam *  Specify the target machine and/or local ip and family
    -i max,min        Specify the max and min number of iterations (15,1)
    -I lvl[,intvl]    Specify confidence level (95 or 99) (99)
                      and confidence interval in percentage (10)
    -l testlen        Specify test duration (>0 secs) (<0 bytes="" font="" trans="">
    -L name|ip,fam *  Specify the local ip|name and address family
    -o send,recv      Set the local send,recv buffer offsets
    -O send,recv      Set the remote send,recv buffer offset
    -n numcpu         Set the number of processors for CPU util
    -N                Establish no control connection, do 'send' side only
    -p port,lport*    Specify netserver port number and/or local port
    -P 0|1            Don't/Do display test headers
    -r                Allow confidence to be hit on result only
    -t testname       Specify test to perform
    -T lcpu,rcpu      Request netperf/netserver be bound to local/remote cpu
    -v verbosity      Specify the verbosity level
    -W send,recv      Set the number of send,recv buffers
    -v level          Set the verbosity level (default 1, min 0)
    -V                Display the netperf version and exit

For those options taking two parms, at least one must be specified;
specifying one value without a comma will set both parms to that
value, specifying a value with a leading comma will set just the second
parm, a value with a trailing comma will set just the first. To set
each parm to unique values, specify both and separate them with a
comma.
* For these options taking two parms, specifying one value with no comma
will only set the first parms and will leave the second at the default
value. To set the second value it must be preceded with a comma or be a
comma-separated pair. This is to retain previous netperf behaviour.
E:\datos\NetPerf-2.4.5-w32>


Take care with the units (about caudal, no about velocity):

106 bit = 1 000 000 bit/s = 1 Mbit/s

1 megabyte/s = 8 megabit/s

1 megabit/s = 1000 kilobit/s = 125 kilobyte/s

UnitBitsBits / 1,000,000
Mega-bit1,000,0001.0
Mebi-bit1,048,5761.05
Mega-byte8,000,0008.0
Mebi-byte8,388,6088.39
Links:




07 enero 2011

Instalar VMware Tools en Linux sin entrono grafico

Una vez que tenemos el sistema operativo sin entorno grafico, accedemos a el y seguimos los siguientes pasos:
1 On the host, select VM > Install VMware Tools.

If an earlier version of VMware Tools is installed, the menu item is Update VMware Tools. If the current version is installed, the menu item is Reinstall VMware Tools.

2 On the guest, log in as root.

3 If your Linux distribution does not automatically mount CD-ROMs, mount the VMware Tools virtual CD-ROM image.
  a- If necessary, create the /mnt/cdrom directory:
      mkdir /mnt/cdrom
  b- Mount the CD-ROM drive.

Some Linux distributions use different device names or organize the /dev directory differently. If your CD-ROM drive is not /dev/cdrom or if the mount point for a CD-ROM is not /mnt/cdrom, modify the command to reflect the conventions used by your distribution.
  
     mount /dev/cdrom /mnt/cdrom

4 Change to a working directory (for example, /tmp):

     cd /tmp

5 If a previous installation exists, delete the previous vmware-tools-distrib directory.
The location of this directory depends on where you placed it during the previous installation. Often it is placed in /tmp/vmware-tools-distrib.

6 Uncompress the installer:

    tar zxpf /mnt/cdrom/VMwareTools--.tar.gz

The value is the product version number and is the build number of the product release.

7 If necessary, unmount the CD-ROM image.
If your Linux distribution automatically mounted the CD-ROM, you do not need to unmount the image.
   umount /dev/cdrom

8 Run the VMware Tools installer.
       cd vmware-tools-distrib
          ./vmware-install.pl

Respond to the questions the command-line wizard displays on the screen. Press Enter to accept the default value. The configuration file, vmware-config-tools.pl, runs after the installer file finishes running.

9 If you are updating VMware Tools, reboot the virtual machine or manually reload the pvscsi, vmxnet, and vmxnet3 Linux kernel modules.
If you reload the modules, networking on the virtual machine is interrupted.

10 Enter the following commands to restore the network:
     /etc/init.d/network stop
        rmmod vmxnet
        modprobe vmxnet
     /etc/init.d/network start