Necko/MobileCache/MicroBenchmarks: Difference between revisions

Line 64: Line 64:
=== test_stresstest_cache_with_timing.js  ===
=== test_stresstest_cache_with_timing.js  ===


This test loads a number of '''different''' resources with uniform size. All responses are 200 Ok, i.e. there are no redirections. The resources are loaded sequentially in a tight loop and the test syncs with cache-io thread after finishing the loop. Each loop is executed for five different cache-configurations/setups:  
This test loads a number of '''different''' resources with uniform size. All responses are 200 Ok, i.e. there are no redirections. The resources are loaded sequentially in a tight loop and the test syncs with cache-io thread after finishing the loop. Each loop is executed for a number of different cache-configurations/setups:  


#no cache enabled, loading all urls from server, not writing to cache (clearing cache before this step)  
#no cache enabled, loading all urls from server, not writing to cache (clearing cache before this step)  
#memory-cache enabled, loading all urls from server, write them to cache (clearing cache before this step)  
#empty memory-cache, loading all urls from server, write them to cache (clearing cache before this step)  
#memory-cache enabled, read all urls from cache (resources cached in previous step)  
#memory-cache primed by pervious step, read all urls from cache again
#disk-cache enabled, loading all urls from server, write them to cache (clearing cache before this step)  
#empty disk-cache, loading all urls from server, write them to cache (clearing cache before this step)
#disk-cache enabled, reading all urls from cache (resources cached in previous step)
#disk-cache primed by pervious step, reading all urls from cache
#memory-cache filled with small (128bytes) entries, loading all urls from server, write them to cache (clear and pre-load cache before this step)
#memory-cache primed by pervious step, read all urls from cache
#memory-cache filled with large (128Kb) entries, loading all urls from server, write them to cache (clear and pre-load cache before this step)  
#memory-cache primed by pervious step, read all urls from cache
#disk-cache filled with small (128bytes) entries, loading all urls from server, write them to cache (clear and pre-load cache before this step)  
#disk-cache primed by pervious step, read all urls from cache
#disk-cache filled with large (128Kb) entries, loading all urls from server, write them to cache (clear and pre-load cache before this step)  
#disk-cache primed by pervious step, read all urls from cache


This whole procedure is repeated over a given list of datasizes, clearing the cache between each repetition.  
This whole procedure is repeated over a given list of datasizes, clearing the cache between each repetition.  
Line 76: Line 84:
Time is measured in two ways: 1) for each individual load by by using the nsITimingChannel interface of the channel, and 2) by measuring run-time of the complete loop from the test itself.  
Time is measured in two ways: 1) for each individual load by by using the nsITimingChannel interface of the channel, and 2) by measuring run-time of the complete loop from the test itself.  


Informally one can say that this test loads a large number of uniformly sized resources at the same time, somewhat similar to what happens when starting up firefox with lots of open tabs.  
Informally one can say that this test loads a large number of uniformly sized resources at the same time, somewhat similar to what happens when starting up firefox with lots of open tabs. Empty and full caches are separately.


==== Generated datafiles  ====
==== Generated datafiles  ====
Line 83: Line 91:


;summary.dat 
;summary.dat 
:Format is multi-data with one datablock for each datasize run by the test. Each datablock has a header describing the datasize, then one row for each of the five configurations summing up the results from the loop. Datapoints are
:Format is multi-data with one datablock for each datasize run by the test. Each datablock has a header describing the datasize, then one row for each of the configurations described above, summing up the results from the loop. Datapoints are


#description of the configuration  
#description of the configuration  
Line 135: Line 143:
==== Sample results  ====
==== Sample results  ====


Here are two plots by "plot-summary-from-javascript.gnu". The leftmost is from a 64 bit Linux server and the rightmost from a Nexus S
Here are two plots by "plot-summary-from-javascript.gnu". The leftmost is from a 64 bit Linux server and the rightmost from a Nexus S. ('''Only results with empty cache is reported here since filling the cache kills my Nexus at the moment.''')


{|  
{|  
97

edits