Posts tagged ‘work’
Cloud computing is a term that originally meant elastic on demand computing but is now a term applied elastically by marketdroids to any form of virtualisation.
This is part of the transition from 2009′s vBullshit to BaaS, Bullshit as a Service.
via chapmancentral.demon.co.uk

Here’s some stuff about ( yeah, I know – ‘geeks, stop migrating from svn and git and vise versa – just developer code and don’t spent time on this!‘ ) svn and git comparison.
What do we have : git and svn installed on a same server, empty both svn and git repositories – I will add same data and provide same changes in both repositories, and also, in another folder, I will checkout how update changes works – so in this tests I’m going to figure out how it works for ‘commiters’ and for ‘those who update changes’. My tests deal with typical operations with version control systems – checkout time for adding, pushing and pulling various types of data and checkout how update for them will work – test’s detailed information is below table. For git I use git+ssh protocol, for svn I use svn protocol. I don’t provide any special configuration nor for git nor for svn – all settings is about to be default. Also I would like to note that this tests is partially incomplete – I don’t checkout how delete, branching, merging and some other functions works – so in future I will try to add these points onto this test. Main result of this test – git is faster than svn about a 2-3 times in typical configuration. There’s only one really bad points – git works bad on pretty big files ( > 300 mb size), for some big size ( ~1gb ) it git even can exit with error about memory leak – there’s some special git-related project – like git-bigfiles – this stuff should help you to work with git and big files together.
| svn | git | svn/git | |
|---|---|---|---|
| Test 1 : adding boost 1_43 | add ( 1 sec )+ commit ( 600 sec ) = 601 sec | add ( 3 sec ) + commit ( 86 sec ) + push ( 612 sec ) = 701 sec | 0.85 |
| Test 2: checkout repository after Test 1 | svn co = 109 sec | clone = 18 sec | 6.05 |
| Test 3 : small changes in sources – add first line with comment to some files – 346 files changed | svn commit = 5 sec | commit(2 sec ) + push ( 2 sec ) =4 sec | ~1 |
| Test 4: update after this Test 3 | svn update = 15 sec | git pull ( 7 sec) | ~2 |
| Test 5: bigger change – add first line with comment to 5363 files | svn commit = 103 sec | commit ( 6 sec ) + push ( 18 sec ) = 24 sec | 4.29 |
| Test 6: update after Test 5 | svn update = 28 sec | git pull = 12 sec | 2.3 |
| Test 7: real-life project add ( 2.6 gb of data ) | svn add(21) + svn commit(1h 2m 25s) = 3 766 sec | add (38 ) + commit ( 1m23 ) + push ( 18m28 ) = 1 m 51 + 18m 28sec= 20 m 19 sec = 20 m 19 sec = 1 219 sec | 3.1 |
| Test 8: update after Test 7 | svn update ( 11m 58 sec ) = 718 sec | git pill = 5m 27 sec = 327 sec | ~2.2 |
| Test 9: source change (change namespace visibility) | svn commit ( 1m 28 sec ) = 98 sec | commit (5 sec ) + push ( 3 sec) = 8 sec | 12.25 |
| Test 10 : update after Test 9 | svn up = 22 sec | pull ( 9sec) | 2.4 |
| Test 11: full checkout project | svn co 12m 45sec = 765 sec | pull ( 4 min 3 sec ) = 243 sec | 3.14 |
| Test 12: big file test : apache log ( 50 mb ) | svn add(3) + commit (1m 27s ) = 1m 30 sec = 90 sec | add (3) + commit(6) + push (1m 18 sec) = 1m 17 sec = 77 sec | 1.16 |
| Test 13 update after test 12 | up = 26 sec | pull = 17 sec | 1.52 |
| Test 14 : big files test: c++ sources in one file ( 70 mb ) | add(3) + commit(1m 15 sec) = 1m 18 sec = 78 sec | add (2) + commit (2) + push ( 56 sec ) = 1 m = 60 sec | 1.3 |
| Test 15 : update after Test 14 | up = 28 sec | pull = 14 sec | ~2 |
| Test 16: 100 MB xml with encoded data | add(3) + commit (8m 37 sec)= 8m 40 sec = 520 sec | add (9 sec) + commit (1) + push ( 24m 34 sec) = 24 m 44 sec = 1484 | 0.35 |
| Test 17 : update after Test 16 | up = 52 sec | pull = 47 sec | 1.10 |
| Test 18 : 300 MB xml with encoded data | add ( 1 ) + commit( 9 m 26 sec )= 9m 27 sec = 567 sec | add (3) + commit(8) +push (17m 12 sec) = 17 m 33 sec = 1053 sec | 0.53 |
| Test 19: update after test 18 | 1m 39 sec | pull= 1m 29 sec | 1.1 |
| Test 20 : 1200 MB xml with encoded data | 1h 24m 34s | failed | ? |
| Test 21 : update after Test 20 | 5m 47 sec | failed | ? |
| ~2.6 |
So – In common we have that git is about 2.6 faster than svn.
I understand that this is may be very non-precious tests and also I don’t check how delete or branching works, but anyway I checkout my own most used operations during this test. In common we can see that git is more than 2 times faster than svn – everything looks fine with git, except one really bad thing – work with big ( more than 100 mb size ) files – for this type of file svn is really works faster, and for too big ( more than 1 GB files ) git even crashed during ‘git push’ command with ‘fatal: Out of memory, malloc failed‘ message.
Test1 boost 1_43 C++ library : 29135 files and 31609 objects including folders, 286 Mb summary size
Test 3
I just add first line to some cpp files :
find ./ -name "*a???.cpp" -exec sed -i 1i"//test comment `date` : {}" {} \;
Test 5
Change all *.cpp files in the same way :
find ./ -name "*.cpp" -exec sed -i 1i"//big test comment2 `date` : {}" {} \;
Test 9:
Refactoring simulation : make to use “std::” specifier for all cerr and cout. Not sure it’s really safe in real-life-development, but it’s okay for test purpose.
find ./ -name "*.h" -exec sed -i "s/ cerr/std::cerr/g" {} \;
find ./ -name "*.cpp" -exec sed -i "s/ cerr/std::cerr/g" {} \;
find ./ -name "*.cpp" -exec sed -i "s/ cout/std::coutr/g" {} \;
Test 11: checkout whole project
Test 12: adding 50 mb text file – apache logs
Test 14: adding 72 mb file – many c++ sources concantenated in one big file
Test 16: small xml : 100 mb – xml file sample from real life
Test 18: medium xml : 300 mb – same ( but bigger ) real-life xml fil
Test 20: large xml : 1200 mb – sample of pretty big real-life xml
git push failed with error message of memory leak ( as I can see ) : “fatal: Out of memory, malloc failed”
I collect some usefull information about different source text repositories version control systems : git, svn, cvs, mercury links – take a look on this if you’re interested in different VCS system using.
Since middle of April 2010 I’m work with redmine as corporate wiki in my company – we choose redmine mostly because it’s free, open-source and pretty popular – we don’t need to provide any accounting stuff to buy it officially and in case of some troubles we can find solution in redmine user’s community ( or fix it by ourselft – it’s written on Ruby btw ). As some minus of redmine I can note that redmine don’t really have very detailed documentation – some stuff is skipped and you need to figure out it by yourselft. So in this post I will share my own tips and trick as redmine active user.
- Using anchors in redmine
- Usefull tips for table formatting in redmine
- How to use HTML tags in your redmine wiki documents ?
- Redmine usefull links
Using anchors in redmine
There’s no {anchor} macro in redmine ( Confluence wiki got it btw ) – instead of this you can use h1, h2 or h3 tags ( but not h4 ! ) – header text will be used by redmine as anchor text. Also if your anchor text contains space you need to replace this spaces (in link ) by minus sign. Also I can note that it’s looks that anchor texts isn’t case sensitive. Here’s some examples which can help you figure out it better :
Here’s some anchors from current page to page with name “my test page” which contains anchors “Hello wordl!” and “test”, so page which contain links is looks like :
[[my_test_page#Hello-world|Hello world]] - link to hello world section on my test page
[[my_test_page#test|test]] - link to test section on my test page
And page to which we refer it something about :
>
h1. Hello world
Some thing about ANSI C.
h2. Test
Something about test
Again I would like to note that only h1,h2, h3 tags will be treated as anchors, not h4. Also you can’t use header with “!” or “?” because you will have troubles with referring anchor to it ( I mean “h1. Hello world!” won’t create proper anchor is I can see from my experience ).
Usefull tips for table formatting in redmine
Here’s a link : Redmine: Create Tables Using Textile Formatting
How to use HTML tags in your redmine wiki documents ?
It’s really easy – go to file redcloth3.rb ( in my installation it located in /opt/redmine/lib/redcloth3.rb ) and change line onto adding tags which you would like to use. For example to enable <br>
and <a> it’s enough to change it line which contains ALLOWED_TAGS initialization with your tags. Originally it was ( in my case this stuff located in 1187 line )
ALLOWED_TAGS = %w(redpre pre code notextile)
and I just it change to
ALLOWED_TAGS = %w(redpre pre code notextile br a)
To apply this changes don’t forget to restart web server – after this you will be able to use <a>.. </a> as they should be in HTML your redmine wiki pages. Also allowing tag <a> ( and as result enable <a name=”#my_anchor_text”> )will give an unlimited possibility to put anchors on wiki pages on any place which you like, for example in middle of tables.
Redmine usefull links
- Redmine installation : Zero to Redmine in 22 Steps
- Mapreduce & Hadoop Algorithms in Academic Papers (3rd update), especially Scaling Up Classifiers to Cloud Computers
- TeamBox – project collaboration tool
- Continuous Integration for C++ by Rick Wagner
- Beyond Position Bias: Examining Result Attractiveness as a Source of Presentation Bias… Yue, Patel, Roehrig, WWW-2010
.. to be continued
Q1: What value will be printed ?
double d1 = 16, d2=2.0;
double d3 = (1/2) * ( sqrt(d1) + d2/2);
cout << d3 << endl;
Q2: Please write your own itoa implementation
Q3: What is pure virtual destructor? Shall ( or can ) pure virtual functions be implemented ?
Q4: Give an example of abort function implementation
Q5: Why we need semicolon after closing bracket in C++ class declaration ?
Q6: Can we call destructor directly? For what we may need it ?
Q7: Can we call constructor directly? For what we may need it ?
Q8: Can we thron an exception in destructor ?
Q9: What happen if we call pure virtual methods in constructor or destructor ? Same question about ‘non-pure’ virtual methods ?
Q10: Why don’t we have virtual constructors in C++ ?
Q11: What is difference between new and new [] ? Same thing about delete and delete [] ?
Q12: What is a difference between static_cast, dynamic_cast, reinterpret_cast and const_cast ?
Q13: Why do we need explicit keyword in C++ ?
Q14: Explain difference between
const MyClass c;
const MyClass &c2 = c;
const MyClass *c2 = &c;
const MyClass * const c2 = &c;
Q15: Difference between const_iterator and iterator
Q16: Implement Rand5 ( which returns randomly 0..4 ) use only Random7 ( which returns 0..6)
Q17: Can we use object of class ( or structure ) which doesn’t have name? Can we declare and use classes and structures without names ?
Q18: What is it factory pattern ?
( to be updated and continued very soon
Answers ( if you need it
) below Continue reading ‘C/C++ interview questions’ »
Some usefull highlights which looks interested for me from Laws of productivity : 8 productivity experiments you don’t need to repeat (if this link doesn’t work please use this link onto copy hosted on bokov.net) – simple thoughts which may help you to organize process better and make it more efficient. Continue reading ‘Laws of productivity : 8 productivity experiments you don’t need to repeat’ »
Using json in bash :
- jsawk : work with an array of JSON objects read from stdin, filter them using JavaScript to produce a results array that is printed to stdout. For example get’s json ( from Yahoo image search by ‘madonna’ query ) and add some info ( madonna’s real name ) to this
- you can use some bash/awk/sed stuff to parse json. For example – list all image urls from json
- or use library from json.org for language which you like
wget http://bokov.net/json_example.json
cat json_example.json | ./jsawk "this.ResultSet.RealName=\"Louise Ciccone\"" > updated_info.json
wget http://bokov.net/json_example.json
cat json_example.json | sed -e 's/[{}]/''/g' | awk -v k="text" '{n=split($0,a,","); for (i=1; i<=n; i++) print a[i]}' | grep '"ClickUrl":' | sed 's/:/ /1' | awk -F" " '{ print $2 }'
via v.kruchkov
We have git repo at github ( and would like to move onto some our corporate box inside our network, for example on internal.bokov.net. This repository is shared for group of developers and all who have ssh access onto internal.bokov.net shall have right to commits onto git repository. So first of all prepare place for git repo at new hosting :
ssh user@internal.bokov.net
cd var
mkdir git_repo
chmod 777 git_repo
cd git_repo
mkdir my_project
cd my_project
git init --bare --shared=all
cd objects
chmod g+ws *
Next clone existing repo and change its settings to point onto internal.bokov.net
git clone --bare git@github.com:bokov/github_project.git
git remote add -t master -m master origin ssh://internal.bokov.net/var/git_repo/my_project/
git push origin master
to start work with new repo just use
git clone ssh://internal.bokov.net/var/git_repo/my_project/
have fun.
- Ubuntu doesn’t asking for login after boot up ( may happen after unexpected shutdown ) :
press Ctrl-Alt-F1 to login in terminal mode and use fsck to fix it - Add user short memo :
[root@my-box ~]# useradd -g users -u 560 tuser
[root@my-box ~]# passwd tuser
ps. sudo will be required in not-root case
- Proper access rights for .ssh files :
chmod 700 ~/.ssh
chmod 600 ~/.ssh/id_rsa
chmod 644 ~/.ssh/id_rsa.pub
chmod 644 ~/.ssh/authorized_keys
chmod 644 ~/.ssh/known_hosts
- List all files in folder sorted by size :
find . -type f -exec du -k "{}" \; | sort -n
Short how-to about configuring Ubuntu to work with EC2 API ( for Ubuntu 10.04 users – Sun JDK was moved to partner repository so please check out Where’s sun JDK on Ubuntu 10.04 ? before follow described steps ).
Continue reading ‘Configuring Ubuntu ( 9.10 ) to work with Amazon EC2’ »
Update in Amazon Web Services:
and Quadruple Extra Large – 68.4 GB of RAM/ 26 ECU (8 virtual cores* 3.25 ECU) : New EC2 High-Memory Instances
Distributed, non-relational database systems – DNRDBMS – see
If anyone interested in it – here’s new update for Sun Grid Engine 6.2 – update 4. It almost about bug fixing and man’s changes – list of changes is here. Sources’ tag for CVS is V62u4_TAG (make sense for Grid Engine, ARCo, SGE Inspect ), by the way as I know Hedeby is still 1.0u3.
- Recursively add files and foldes into CVS
find . -type d -print | grep -v CVS | xargs -n1 cvs add
- Delete “.svn” files from current folder
find . -type f -exec echo \"{}\" \; | grep ".svn" | xargs rm
Grid Dynamics nominated “2009 Top 150 Cloud Computing Players” by Cloud Computing Journal. Look at letter G – here we are, around Google.
.
Public cloud providers : hybrid cloud vs instance types, API logging vs stability – comparing goGrid and Amazon EC2 .GoGrid is officially out of beta, so now it’s time to compare GoGrid with the public cloud market leader, Amazon EC2. Both vendors have relatively stable performance metrics and they both implement the basic functionality of a cloud provider:
- Programmatic control via REST API
- Scalable data storage solution: Elastic Block Storage in Amazon AWS and CloudStorage in GoGrid
- Ability to assign external IP addresses
- Ability to grant root/administrator credentials
- Many options to configure the cloud cluster
- Windows and Linux support
- Web console for monitoring and management
So far, as cloud providers GoGrid and Amazon EC2 look very similar, but practical experience of using them in real-life projects helps us identify some unique features that can be important for specific applications – for highlighed features and bad points for both providers look onto GoGrid is out of beta on Grid Designer’s Blog
- Cloud Hosting Performance
- Measuring EC2 system performance
- Comparing Amazon EC2 performance with other cloud/VPS hosting options… and real hardware
- Monitoring Cloud Computing Performance with PRTG: CPU, Disk, Memory Speed Comparison of Amazon EC2 Instance Types
- Posted by Alexey Bokov on August 18, 2009 at 5:47 pm under administration, compute grid, internet, useful links.
Tags: administration, Amazon EC2, gogrid, work
Comment on this post.
- Realtime data on subway / bus arrivals / locations for use in mobile apps,
- Free WiFi locations in all 5 boroughs
- Mobile app to replace metro cards and kiosks
