Skip to content

Running DirectMemory

raffaeleguidi edited this page Jan 23, 2011 · 7 revisions

Runtime requirements

**DirectMemory **depends on at least java 1.4.2, SLF4j (I use the logback implementation in any case). It is tested using JUnit 4 and javasimon to check performance and concurrency requirements. I quit using contiperf and begun to use javasimon which could also be used at runtime with JMX. Javasimon does not impose any significant overhead but, in any case, monitoring is not embedded in core logic but applied with a dedicated aspect which can be removed at any time without impact on code.

All dependencies are packed up in the lib directory of the standalone demo (current version is 1.1) that you can find in the downloads page.

Development and Test environment

My development system is a dual core laptop with 2GB of ram running windows xp SR3 - 32 bits and I have a 4 cores test machine with 4gb (win xp SR2 - 32 bits). I run the tests using both a sun 1.6 rev 22 jdk and an IBM jdk 1.6

Standalone demo startup and settings

Download and unzip the standalone demo from the downloads page and run:

(*nix)
bin/DemoApp
(win)
bin\DemoApp.bat

Please feel free to experiment with different configurations and let me know (logs, please) how they perform

*** Default jvm settings ***

JVM settings can be set changing the following line in bin/DemoApp or bin\DemoApp.bat

set EXTRA_JVM_ARGUMENTS=-Xmx512m -Xms512m -XX:MaxDirectMemorySize=512m

Default configuration

demo.demoToRun=cachemanager2mt
#demo.demoToRun=cachemanager2
#demo.demoToRun=multithreaded
#demo.demoToRun=singlethreadednopojoreuse
#demo.demoToRun=singlethreaded
#demo.demoToRun=cachemanager
#demo.demoToRun=default
demo.threadCount=10
demo.writersPercentage=10
demo.numberOfEntries=100000
demo.entriesInHeap=1000
demo.entriesOffHeap=-1
demo.payloadInKb=2
demo.pstuffBufferSizeInKb=3
demo.pageSizeInMb=5
demo.maxPages=2
demo.batchSize=10
demo.logEvery=100
demo.showStatusEvery=1000

Clone this wiki locally