Last month I've been using Bitbucket for hosting my company's Mercurial repository.
I am admire of SaaS approach, but Bitbucket has succeeded proving me the opposite.
My repository is unavailable right now. And this happens much more offen than I expected from service dedicated for code hosting. pull/push operations take long time (up to 5-10 seconds). I have no idea how to make Mercurial so slow.
Maybe I'll give Assembla a try. But more probable, I'll rent a small VDS at Gandi and deploy my own Mercurial installation there.
I'll share some bits of IT knowledge here: CScience, WEB, Networking, Python, C++, Unix, Linux, Ubuntu, etc.
вторник, 20 апреля 2010 г.
среда, 23 декабря 2009 г.
flashpolicytwistd Ubuntu package
I've created an Ubuntu DEB package for flashpolicytwistd - a simple Flash Policy Server written in Python/Twisted. This simplifies installation process a lot.
Find the deb at project's download page.
Find the deb at project's download page.
понедельник, 21 декабря 2009 г.
CPU benchmark
I wrote a simple Python program, which builds R-Tree index for 100k nodes.
The program runs single thread and this means that only a single core of a CPU is working.
3m 31.322s Intel(R) Core(TM)2 Duo CPU T7300 @ 2.00GHz
3m 2.835s Quad-Core AMD Opteron(tm) Processor 2372 HE @ 2.1Ghz
1m 31.393s Intel(R) Core(TM) i7 CPU 975 @ 3.33GHz
The program runs single thread and this means that only a single core of a CPU is working.
3m 31.322s Intel(R) Core(TM)2 Duo CPU T7300 @ 2.00GHz
3m 2.835s Quad-Core AMD Opteron(tm) Processor 2372 HE @ 2.1Ghz
1m 31.393s Intel(R) Core(TM) i7 CPU 975 @ 3.33GHz
суббота, 28 ноября 2009 г.
ssh hangup when working via router
I've discovered that my ssh connection occasionally hangs up when I am working through my WIFI router. And ssh works fine when the PC is connected directly to WAN.
This might happen because router drops the connection from its NAT table due to inactivity. To aid this, edit (or create) ~/.ssh/config and add there few lines:
This might happen because router drops the connection from its NAT table due to inactivity. To aid this, edit (or create) ~/.ssh/config and add there few lines:
Host *
ServerAliveInterval 60
пятница, 16 октября 2009 г.
Flash policy server
Flash player uses policy server to check its permission to open sockets to certain ports of certain server.
Adobe provides sample Flash policy server. But it is unusable for production. It creates a thread per connection. Also it shows strange virtual memory usage.
That is why I wrote simple flashpolicytwistd using Python/Twisted.
Adobe provides sample Flash policy server. But it is unusable for production. It creates a thread per connection. Also it shows strange virtual memory usage.
That is why I wrote simple flashpolicytwistd using Python/Twisted.
суббота, 12 сентября 2009 г.
Postgresql's huge disadvantage
When building a database which has a big deal of ranged queries, it might be extremely helpful to have clustered index support.
Let say, you keep a table of messages. To query last 10 at inbox it takes about 1 disk seek in worst case with clustered on index by (receiver, timestamp). When there is no clustering, be ready to issue 10 disk seeks.
InnoDB and MS SQL Server both have clustered index support. Instead, Postgresql provides CLUSTER command, which must be explicitly issued to rebuild internal database structure to cluster rows according to specified index. In order to keep you DB more or less clustered, you have to cron the CLUSTER command.
But:
1) CLUSTER takes exclusive lock on table. It took 2 hours to cluster my 3 GB of data. Daily cron would render my application to have 10% downtime. Nice. You can try to aid this by using pg_reorg.
2) Clustering does not change any logical data, only physical storage layout. Nevertheless, it generates the amount of WAL equal to the size of the data. Again, daily CLUSTER would add 3 GB of backup traffic. Same with pg_reorg.
All this makes clustered indexing in Postgresql unusable.
Let say, you keep a table of messages. To query last 10 at inbox it takes about 1 disk seek in worst case with clustered on index by (receiver, timestamp). When there is no clustering, be ready to issue 10 disk seeks.
InnoDB and MS SQL Server both have clustered index support. Instead, Postgresql provides CLUSTER command, which must be explicitly issued to rebuild internal database structure to cluster rows according to specified index. In order to keep you DB more or less clustered, you have to cron the CLUSTER command.
But:
1) CLUSTER takes exclusive lock on table. It took 2 hours to cluster my 3 GB of data. Daily cron would render my application to have 10% downtime. Nice. You can try to aid this by using pg_reorg.
2) Clustering does not change any logical data, only physical storage layout. Nevertheless, it generates the amount of WAL equal to the size of the data. Again, daily CLUSTER would add 3 GB of backup traffic. Same with pg_reorg.
All this makes clustered indexing in Postgresql unusable.
воскресенье, 6 сентября 2009 г.
Postgresql tuple/row
Q: What is the difference between tuple and row in Postgresql?
A: Tuple is a some version of a row.
A: Tuple is a some version of a row.
Подписаться на:
Сообщения (Atom)