Skip to content

Instantly share code, notes, and snippets.


Vladimir Sitnikov vlsi

View GitHub Profile
vlsi / 01summary.txt
Last active Sep 3, 2015
View 01summary.txt
# i7-4960HQ CPU @ 2.60GHz, jdk1.8.0_51
Benchmark Mode Cnt Score Error Units
ControlFlowExceptionBenchmark.baseline avgt 10 8,434 ± 0,374 ns/op
ControlFlowExceptionBenchmark.baseline:·gc.alloc.rate avgt 10 0,002 ± 0,006 MB/sec
ControlFlowExceptionBenchmark.baseline:·gc.alloc.rate.norm avgt 10 ≈ 10⁻⁵ B/op
ControlFlowExceptionBenchmark.baseline:·gc.count avgt 10 ≈ 0 counts
ControlFlowExceptionBenchmark.nonWritable avgt 10 16,805 ± 1,247 ns/op
ControlFlowExceptionBenchmark.nonWritable:·gc.alloc.rate avgt 10 909,666 ± 61,399 MB/sec
ControlFlowExceptionBenchmark.nonWritable:·gc.alloc.rate.norm avgt 10 16,000 ± 0,003 B/op
ControlFlowExceptionBenchmark.nonWritable:·gc.churn.PS_Eden_Space avgt 10 90
vlsi / 00findings.txt
Last active Oct 20, 2015
if (ArrayIndexOutOfBoundsException) {...}
View 00findings.txt
This is a result of running
1) Best result for testSingle is for java7u55+catch(AIOOBE), however java7's results are not stable
2) java 7 results are very unstable:
For isntance:
# Warmup Iteration 1: 548,557 ns/op
# Warmup Iteration 6: 102,104 ns/op
vlsi /
Last active Dec 2, 2015
Sample release logs of pgjdbc
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
View PostgreSQL and JDBC: striving for high performance
Vladimir Sitnikov is currently working on performance and scalability of NetCracker OSS.
Telecommunication companies world wide use NetCracker OSS for enterprise and network automation.
Vladimir is keen on Java and database performance: Oracle, PostgreSQL. He’s one of the committers
in the PostgreSQL JDBC driver project, and architect of many performance improvements.
Common Java wisdom is to use PreparedStatements and Batch DML in order to achieve top performance.
It turns out one cannot just blindly follow the best practices. In order to get high throughput, you need
to understand the specifics of the database in question, and the content of the data.
vlsi / 01_init.sql
Last active Sep 8, 2016
PostgreSQL index only scan for expression testing
View 01_init.sql
drop table vlsi;
create table vlsi(pk int4, type numeric, vc varchar(500), num numeric);
insert into vlsi(pk, type,vc,num) select s.x, round(x/1000), md5('||x)||md5('||x+1)||md5(''||x+2), mod(x, 1000)
from generate_series(1,1000000) as s(x);
-- Several values exceeed 128 substr, so they require "table access"
insert into vlsi(pk, type,vc,num) select s.x+1000000, round(x/1000), lpad('a', 128, 'a')||'zxc'||s.x||'v', mod(x, 1000)
from generate_series(1,10) as s(x);
vlsi /
Created Feb 4, 2017
JTextArea append benchmark

According to the measurements, replaceRange + append works faster than setText except for the case when text is fully replaced. In 100% replace case setText is on par with replaceRange + append (the results are within error bounds).

For small appends there's a win in terms of response time and memory allocation.

# JMH 1.12 (released 309 days ago, please consider updating!)
# VM version: JDK 1.8.0_102, VM 25.102-b14
# VM invoker: /Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home/jre/bin/java
vlsi / comma_sequence_per_line.csv
Created Sep 9, 2014
Sample data for crash in data.table/fread
View comma_sequence_per_line.csv
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 9.
vlsi / hs_err_pid57596.log
Created Nov 4, 2017
shenandoah/jdk10 crash logs
View hs_err_pid57596.log
# A fatal error has been detected by the Java Runtime Environment:
# Internal Error (/Users/vladimirsitnikov/Documents/work/shenandoah/src/hotspot/share/opto/node.cpp:177), pid=57596, tid=27907
# assert(_refresh_tick < 2*100000) failed: DU iteration must converge quickly
# JRE version: OpenJDK Runtime Environment (10.0) (fastdebug build 10-internal+0-adhoc.vladimirsitnikov.shenandoah)
# Java VM: OpenJDK 64-Bit Server VM (fastdebug 10-internal+0-adhoc.vladimirsitnikov.shenandoah, mixed mode, tiered, compressed oops, g1 gc, bsd-amd64)
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
vlsi /
Last active Mar 7, 2018
JMeter suggestion: add comment that briefly describes test plan as an XML comment

Current JMeter's JMX files are not human-readable, and it is hard to review "diff" between two versions of a script.

I suggest adding a human-readable comment to the start of the file, so the diff between scripts can be easier to understand:

<?xml version="1.0" encoding="UTF-8"?>
Test plan:
   Thread group (146 threads, 1:00:00 duration)
      login (http sampler /login)
You can’t perform that action at this time.