Different versions can be downloaded from www.simo-project.org/download/releases/latest/.
If you downloaded the executable distribution and decompressed the downloaded file, you’ve all set up. You can jump directly to Using SIMO section.
IMPORTANT: If you are using the executable distribution on Windows, you MUST install the Visual C++ 2008 Redistributable package or you will get cryptic errors on missing dlls or incorrect Side-by-side configuration.
The source distribution needs two more step besides decompression before it’s usable.
You need to have Python programming language installed. You can get it from www.python.org. SIMO is not ready for Python 3, so download the latest Python 2.6.x version. Installing Python is usually necessary only on Windows, on Linux and OS X you should already have a working Python installation.
Besides Python, you’ll need a Python package called setuptools. You can test whether you have setuptools installed by writing easy_install on the command line. If the output is something like “error: No urls, filenames, or requirements specified (see –help)” you’re good to go, but if easy_install is not recognized as a command, download ez_setup.py and run:
python ez_setup.py
After you’ve got working versions of Python and setuptools, the next steps depend on whether you’re using a Unix variant or Windows.
On the command line in the directory into which you decompressed the downloaded SIMO source distribution, issue this command:
python build_env.py
Then go and grab a cup of coffee, the building process will take a good while. When it finishes you should have a working SIMO installation and you are ready for the Using SIMO section.
If you run into trouble in the python build_env.py stage, have a look at the Known issues with SIMO installation section.
Buildout will build a Python for you within the buildout environment, but in addition to that you might want to build a general Python version that is more up to date than the system Python that Apple provides. These instructions are based on this blog post<http://tinyurl.com/ybdsf43>.
Making sure you have 32- and 64-bit enabled readline. First download the latest readline release and then:
export MACOSX_DEPLOYMENT_TARGET=10.6
export CFLAGS="-arch i386 -arch x86_64"
export LDFLAGS="-Wall -arch i386 -arch x86_64"
./configure
make
sudo make install
Download latest Python source release and:
./configure --enable-framework --with-universal-archs=intel \
--enable-universalsdk=/Developer/SDKs/MacOSX10.6.sdk
Now you should have a working Python installation in /Library/Frameworks/Python.framework
Download and install Python 2.6 (if you didn’t already)
Download and install the compatible C compiler: Visual C++ 2008 Express
Install setuptools, which also includes easy_install, using the exe-installer found here
Download sqlite3 amalgamation source
Download pysqlite source (.tar.gz):
Download and install something that can unpack tar and gzip files, (e.g. 7-zip
Unpack sqlite3 to a location of your choosing, start up the Visual Studio 2008 command prompt (under tools in the visual studio start menu), navigate to where you unpacked sqlite3 and run the following (two separate commands):
cl /c /O2 /D SQLITE_ENABLE_LOAD_EXTENSION /D SQLITE_ENABLE_RTREE /D SQLITE_THREADSAFE /D HAVE_READLINE sqlite3.c
link /LIB /OUT:sqlite3.lib sqlite3.obj
Unpack pysqlite to a location of your choosing, find the setup.cfg in the folder and alter it to match the following (where <sqlite_path> is where you just compiled sqlite3):
[build_ext]
include_dirs=<sqlite_path>
library_dirs=<sqlite_path>
libraries=sqlite3
define=HAVE_LOAD_EXTENSION,SQLITE_ENABLE_RTREE
Now run (in the folder where you extracted the source):
python setup.py build --force
python setup.py install
Download and install the compatible C compiler: MinGW (make sure it’s on PATH for simplicity)
In the mingw installation folder, copy liblibmingw32.a -> <python installation>libsmingw32.lib and liblibmingwex.a -> <python installation>libsmingwex.lib
In <python installation>libs run the following:
lib -remove:mbrtowc.o mingwex.lib
lib -remove:wcrtomb.o mingwex.lib
Download and install Python 2.5 (if you didn’t already)
Download and install the compatible C compiler: MinGW (make sure it’s on PATH for simplicity)
Install setuptools, which also includes easy_install, using the exe-installer found here
Download sqlite3 amalgamation source
Download and install something that can unpack tar and gzip files, (e.g. 7-zip
Unpack sqlite3 to a location of your choosing, navigate to that location in command prompt and run with the mingw gcc:
gcc -O2 -USQLITE_OMIT_LOAD_EXTENSION -DSQLITE_ENABLE_LOAD_EXTENSION=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_THREADSAFE=2 -DHAVE_READLINE=1 -c sqlite3.c
gcc -shared -s -o sqlite3.dll *.o
Copy sqlite3.dll to C:WINDOWSSYSTEM32 (or to a folder in the path if you don’t have access to system32). If you plan on using pyinstaller, you also need to copy sqlite3.dll to <pythonpath>DLLs
Download pysqlite source
Unpack pysqlite to a location of your choosing, find the setup.cfg in the folder and alter it to match the following (where <sqlite_path> is where you just compiled sqlite3):
[build_ext]
include_dirs=<sqlite_path>
library_dirs=<sqlite_path>
libraries=sqlite3
define=HAVE_LOAD_EXTENSION,SQLITE_ENABLE_RTREE
Now run (in the folder where you extracted the source):
python setup.py build --force -c mingw32 install --force
easy_install -Z cython (on 2.6 run in the Visual Studio 2008 command prompt)
easy_install -Z ZODB3
easy_install -Z pygooglechart
easy_install -Z python-dateutil
easy_install -Z pyparsing
If easy_installing cython fails, you can get ready made Windows binaries
If easy_installing pyparsing, dry specifying the pyparsing package explicitly
easy_install http://cheeseshop.python.org/packages/source/p/pyparsing/pyparsing-1.5.5.tar.gz
easy_install nose
easy_install minimock
easy_install interlude
easy_install guppy
python build_env.py
There’s a third option for installing SIMO if you want to track the latest and greatest developments. You can do a subversion checkout for the SIMO codebase and you can track the development day in day out. The checkout address is:
svn.simo-project.org/simo/trunk
After the checkout you essentially have the source distribution (plus a few bits and pieces), so follow the instructions above.
For Unix, change /etc/sysctl.conf (PLEASE backup this file first!) Linux: kernel.shmmax=value Mac OS: kern.sysv.shmmax=value FreeBSD: kern.ipc.shmmax=value
Note, if getconf is on your system, you can run the following to get good inital values for shmmax and shmall:
#!/bin/bash # simple shmsetup script page_size=`getconf PAGE_SIZE` phys_pages=`getconf _PHYS_PAGES` shmall=`expr $phys_pages / 2` shmmax=`expr $shmall * $page_size` echo kernel.shmmax = $shmmax echo kernel.shmall = $shmall
sysctl.conf (on a 4 core 16GB RAM system)
kernel.shmall = 2057198 kernel.shmmax = 8426285056 # note, this value must be equal or greater than postgresql shared_buffers setting, though roughly half of your RAM is a good example. kernel.sem = 250 32000 100 128 # may need to increase these further if a large number of processes are on the same system # Potentially helpful, but untested settings # vm.swappiness=0 # try to avoid swapping; may hurt performance if you run out of memory # vm.overcommit_memory=2 # don’t let processes allocate more memory than they need.
Also, consider setting ‘noatime’ to the database volume mount options to disable constantly updating file access times.
reboot (or sudo sysctl -p should also work)
Use pgtune (http://pgfoundry.org/projects/pgtune/), which on a 4 core 16GB RAM system resulted in the following (IMPORTANT! note the non pgtune wizard entries):
#—————————————————————————— # CUSTOMIZED OPTIONS #——————————————————————————
# SSD options (only if you have a seperate ssd) data_directory = ‘/ssd/postgresql_data’ # use data in another directory seq_page_cost = 0.05 random_page_cost = 0.1
#custom_variable_classes = ‘’ # list of custom variable class names default_statistics_target = 50 # pgtune wizard 2011-10-12 maintenance_work_mem = 960MB # pgtune wizard 2011-10-12 constraint_exclusion = on # pgtune wizard 2011-10-12 checkpoint_completion_target = 0.9 # pgtune wizard 2011-10-12 effective_cache_size = 11GB # pgtune wizard 2011-10-12 work_mem = 96MB # pgtune wizard 2011-10-12 work_mem = 128MB # book recommendation for speed wal_buffers = 8MB # pgtune wizard 2011-10-12 wal_buffers = 16MB # book recommendation for any server (but especially on heavy insert work) checkpoint_segments = 16 # pgtune wizard 2011-10-12 shared_buffers = 3840MB # pgtune wizard 2011-10-12 max_connections = 80 # pgtune wizard 2011-10-12 # BULK LOAD OPTIONS, DISABLE AFTER DONE!!! checkpoint_segments = 128 # or even 256? checkpoint_timeout = 1800 # in seconds; 30 min work_mem = 256MB # improves order by, distinct etc # synchronous_commit = off # this can be done clientside, so no need to do it here. Iit will mean however that the data may be malformed on catastrophe # fsync = off # may be unnecessary and could destroy the existing database if something goes wrong!!!