[Dev] Crosswalk Vs WRT performance

Nicolas Zingilé nicolas.zingile at open.eurogiciel.org
Fri Apr 4 09:55:35 GMT 2014


Hi all,

I made some tests to compare performance of WRT and Crosswalk. The 
results showed that there's apparently a serious problem of memory leaks 
in WRT.











For those who are interested in running the tests on their own side, 
you'll find the scripts used, the procedure, and the results attached to 
this mail

Regards


-- 
---
Nicolas Zingilé
Intel OTC - Vannes FR

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.tizen.org/pipermail/dev/attachments/20140404/cde1346f/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: memory_fishietank.png
Type: image/png
Size: 27308 bytes
Desc: not available
URL: <http://lists.tizen.org/pipermail/dev/attachments/20140404/cde1346f/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cpu_fishietank.png
Type: image/png
Size: 24126 bytes
Desc: not available
URL: <http://lists.tizen.org/pipermail/dev/attachments/20140404/cde1346f/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: memory_aquarium.png
Type: image/png
Size: 26647 bytes
Desc: not available
URL: <http://lists.tizen.org/pipermail/dev/attachments/20140404/cde1346f/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cpu_aquarium.png
Type: image/png
Size: 26388 bytes
Desc: not available
URL: <http://lists.tizen.org/pipermail/dev/attachments/20140404/cde1346f/attachment-0007.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wrt_vs_crosswalk.ods
Type: application/vnd.oasis.opendocument.spreadsheet
Size: 52529 bytes
Desc: not available
URL: <http://lists.tizen.org/pipermail/dev/attachments/20140404/cde1346f/attachment-0001.ods>
-------------- next part --------------
#!/bin/bash 

wrt_processes=$(ps -ef | egrep MiniBrowser\|WebProcess | egrep -v egrep | sed 's/ \+ / /g' | cut -d" " -f2)

#echo "List of wrt processes : " 
echo $wrt_processes


for run in {0..29}
do 
	echo -e "\n================= Time (s) : $(($run * 120)) ================="
	
	echo -e "\n### Memory usage (MiB) ###"
	(for process in $wrt_processes
	do 
		ps_mem.py -p $process | sed -n '3p' | cut -d"=" -f2 | sed 's/^ *//' | cut -d" " -f1
	done) | awk 'BEGIN {x=0} {x+=$1} END {print x}'

	echo -e "\n### CPU USAGE (%) ###"
	(for process in $wrt_processes
	do
		ps -o"%C" -p $process | sed -n '2p' | sed 's/^ *//'
 	done) | awk 'BEGIN {x=0} {x+=$1} END {print x}'
	sleep 120
done
-------------- next part --------------
#!/bin/bash 

xwalk_processes=$(ps -ef | grep xwalk | grep -v grep | grep -v bash | sed 's/ \+ / /g' | cut -d" " -f2)

#echo "List of xwalk processes : " 
echo $xwalk_processes


for run in {0..29}
do 
	echo -e "\n================= Time (s) : $(($run * 120)) ================="
	
	echo -e "\n### Memory usage (MiB) ###"
	(for process in $xwalk_processes
	do 
		ps_mem.py -p $process | sed -n '3p' | cut -d"=" -f2 | sed 's/^ *//' | cut -d" " -f1
	done) | awk 'BEGIN {$x=0} {x+=$1} END {print x}'

	echo -e "\n### CPU USAGE (%) ###"
	(for process in $xwalk_processes
	do
		ps -o"%C" -p $process | sed -n '2p' | sed 's/^ *//'
 	done) | awk 'BEGIN {$x=0} {x+=$1} END {print x}'
	sleep 120
done
-------------- next part --------------
##############################################
Procedure to reproduce the following result 
##############################################


#### Test environment ####

- Target   : Nexcom VTC 7120-BK
- Snapshot :  tizen_20140331.1_ivi-mbr-i586
- Hard drive information :
	Vendor: ATA      Model: INTEL SSDSC2CT06 Rev: 300i
	Type:   Direct-Access                    ANSI  SCSI revision: 05
- Graphical output : VGA

- Resources :
	. ps_mem.py		: compute the memory usage of a process : https://github.com/eurogiciel-oss/ps_mem
	. wrt_test	  	: compute the memory and the CPU usage of wrt processes (MiniBrowser and WebProcess) every two minutes for one hour (using the ps_mem.py script)
	. xwalk_test	: compute the memory and the CPU usage of all xwalk processes every two minutes for one hour (using the ps_mem.py script)

## Note 1 ##

Tests are performed without resizing the window of the browser. 
Basically for the MiniBrowser the window size is 800x547. For the xwalk browser, default window size is 830x571.
The tests *will not* take into account this difference.

## Note 2 ##

For convenience, in the following lines we will call :

nexcom01 - the device on which we will evaluate the performance of WRT
nexcom02 - the device on which we will evaluate the performance of crosswalk

The two devices should strictly have the same technical features.

## Note 3 ##

The test web pages are launched under the app user.
Once connected as root, to switch to the app user type the following commands:
	su - app
	export XDG_RUNTIME_DIR=/run/user/5000

Command line to launch the web pages :

WRT 		: MiniBrowser <url>
crosswalk	: xwalk <url>


#### Test environement setup ####

1 - Flash nexcom01 and nexcom02 with the same IVI snapshot

2 - Download the ps_mem.py script on your host PC :
	. git clone https://github.com/eurogiciel-oss/ps_mem.git

3 - Setup the nexcom01 device
	. copy the ps_mem.py script on the target :
		- scp ps_mem/ps_mem.py root@<ip_of_nexcom01>:/usr/bin
	. copy the wrt_test script on the target :
		- scp wrt_test root@<ip_of_nexcom01>:

4 - Setup the nexcom02 device
	. download the crosswalk package :
		- ssh root@<ip_of_nexcom02>
		- wget https://download.01.org/crosswalk/releases/crosswalk/tizen-ivi/canary/6.34.112.0/crosswalk-6.34.112.0-0.i686.rpm
	. install the crosswalk package
		- zypper -n in crosswalk-6.34.112.0-0.i686.rpm
	. copy the ps_mem.py script on the target :
		- scp ps_mem/ps_mem.py root@<ip_of_nexcom02>:/usr/bin
	. copy the xwalk_test script on the target :
		- scp xwalk_test root@<ip_of_nexcom02>:

#### Run the tests ####

To run the tests on a target : example on nexcom01 (wrt_test)

1 - Open two ssh connections to the target : one as app user and the other on as root user

as app :
--------

ssh root@<ip_of_nexcom01> 
su - app 
export XDG_RUNTIME_DIR=/run/user/5000

as root :
---------

ssh root@<ip_of_nexcom01>

2 - Launch the web test page on the app terminal, and set up number of fishes.

MiniBrowser http://ie.microsoft.com/testdrive/Performance/FishIETank/

Put 500 fishes 


3 - On the root terminal, record the memory usage and the CPU load in a file :

./wrt_test > wrt_FishIETank

4 - wait for one hour :)...   

5 - get the results.

NB : procedure is the same for launching the test on the xwalk target except the command line and the script name

- launch the test web page 		: xwalk http://ie.microsoft.com/testdrive/Performance/FishIETank/
- record memory and CPU usage 	: ./xwalk_test >  xwalk_FishIETank


More information about the Dev mailing list