Antiques
Today our neighbors moved from the bottom and throwing all the trash.
funny, but I bought a piano Ed Seiler end of XIX century up to 4 TR - Its just put in a staircase. The neighbors were glad that we should not pay his disposal.
extraordinary thing!
Sunday, January 24, 2010
Sunday, January 17, 2010
Second Hand Cello Cases
Linux / FreeBSD filesystems benchmark (extents with random access)
below the benchmark results of several PSI Linux and FreeBSD. Benchmark highly specialized - emulating the load разрабатываемого собственного хранилища (истории сообщений Instant Messenger'а) с изначально крайне высоким уровнем рандомных сиков. Сторадж расчитан на интенсивной use virtual memory to "sharpening" on page fault'y.
The results are a brief description of the system on which they run (if in more detail, it is HP Pavilion tx2650 with the strap pulled out 2G RAM, so the system staor 1G RAM).
DECRIPTION
~~~~~~~~~~
Create (mmap ()) 4G file on different filesystems with only 1G RAM available and
_sequentialy_ write one byte to each mmap () 'ed page.
Following OSes are used: Linux-2.6.31, FreeBSD-8.0.
SATA.
Time is measured in microseconds.
Envirnoment (linux only):
scheduler anticipatory
nr_requests 1024
read_ahead_kb 0
RESULTS
~~~~~~~
I. Linux EXT3
ftruncate time: 11,789,105
mmap time: 29,794,195
sync time: 1,138,126
total time: 42,721,426
EXT3 hasn't native fallocate() implementation, so glibc uses ugly strut which
significantly degradate performance by sequential zero bytes write.
II. Linux EXT4
ftruncate time: 87,686
mmap time: 37,493,712
sync time: 476,279
total time: 38,057,677
fallocate time: 1,465,564
work time: 39,156,443
sync time: 118,039
total time: 40,740,046
III. Linux XFS
ftruncate time: 36,429,649
mmap time: 12,638,933
sync time: 109,912
total time: 49,178,494
fallocate time: 60,449,098
work time: 8,114,137
sync time: 97,437
total time: 68,660,672
with mount option 'nobarrier':
ftruncate time: 84,547,748
mmap time: 25,923,368
sync time: 463,249
total time: 110,934,365
Kernel hang up on fallocate call (xfs_iowait_end).
IV. Linux Reiser3
ftruncate time: 7,298,345
mmap time: 37,633,576
sync time: 1,372,845
total time: 46,304,766
No native fallocate() implementation.
V. Linux JFS
ftruncate time: 27,337
mmap time: 38,026,407
sync time: 472,908
total time: 38,526,652
No native fallocate() implementation.
VI. Linux NILFS2 (log-structured)
ftruncate time: 10,746
mmap time: 133,163,126
sync time: 82,204
total time: 133,256,076
VII. Linux BtrFS
ftruncate time: 6,362,707
mmap time: 29,376,188
sync time: 697,479
total time: 36,436,374
fallocate time: 1,011,155
work time: 33,286,975
sync time: 1,051,298
total time: 35,349,428
with enabled transparent compression (zlib):
ftruncate time: 2,501,566
mmap time: 40,978,856
sync time: 81,784
total time: 43,562,206
fallocate time: 1,635,162
work time: 32,520,697
sync time: 1,089,237
total time: 35,245,096
with default IO settings:
ftruncate time: 7,841,727
mmap time: 36,649,721
sync time: 2,041,199
total time: 46,532,647
VIII. FreeBSD-8.0 UFS2 with soft updates and access time optimization:
ftruncate time: 194,578,591
work time: 127,750,409
sync time: 164,474
total time: 322,493,474
FreeBSD hasn't fallocate () or any analogues.
IX. FreeBSD ZFS
ftruncate time: 15,900,672
work time: 184,591,076
sync time: 340,969
total time: 200,832,717
ZFS compressed = gzip:
ftruncate time: 17,853,223
work time: 164,578,902
sync time: 117,330
total time: 182,549,455
and the code of the test (inklyudy not included - Learn they swear, I do not know how to turn off):
/ *
* IM Storage workflow emulation to benchmark different filesystems.
* /
/ / file size must be significantly greater than available RAM
# define MSIZE ((size_t) 2 * 1024 * 1024 * 1024)
# define ESIZE ((size_t) 2 * 1024 * 1024) / / extent size
# define time_count (id) \\
do {\\
struct timeval tv; \\
if (gettimeofday (& tv, NULL)) {\\
perror("gettimeofday"); \
exit(1); \
} \
t ## id += tv.tv_sec * 1000000 + tv.tv_usec - tLast; \
tLast = tv.tv_sec * 1000000 + tv.tv_usec; \
} while (0)
int
main(int argc, char* argv[])
{
if (argc < 3) {
std::cerr << "please specify test file location and"
" bool value (1 int fd = open(path, O_RDWR MSIZE / ESIZE; ++e) {
#ifndef __FreeBSD__ // FreeBSD hasn't fallocate analog
if (strncmp(argv[2], "1", 1) == 0) {
method = "fallocate";
if (posix_fallocate(fd, e * ESIZE, ESIZE)) {
perror("fallocate");
exit(1);
}
} else
#endif
{
method = "ftruncate";
if (ftruncate(fd, (e + 1) * ESIZE)) {
perror("ftruncate");
exit(1);
}
}
time_count(Init);
maps[e] = mmap(NULL, ESIZE, PROT_WRITE
exit(1);
}
time_count(Sync);
// show statistic
std::cout << "\t" << method << " time: " << tInit << std::endl;
std::cout << "\twork time: " << tWork << std::endl;
std::cout << "\tsync time: " << tSync << std::endl;
std::cout << "\ttotal time: " << (tInit + tWork + tSync) \u0026lt;\u0026lt;Std:: endl;
if (unlink (path)) {
perror ("unlink");
exit (1);
}
return 0;
}
below the benchmark results of several PSI Linux and FreeBSD. Benchmark highly specialized - emulating the load разрабатываемого собственного хранилища (истории сообщений Instant Messenger'а) с изначально крайне высоким уровнем рандомных сиков. Сторадж расчитан на интенсивной use virtual memory to "sharpening" on page fault'y.
The results are a brief description of the system on which they run (if in more detail, it is HP Pavilion tx2650 with the strap pulled out 2G RAM, so the system staor 1G RAM).
DECRIPTION
~~~~~~~~~~
Create (mmap ()) 4G file on different filesystems with only 1G RAM available and
_sequentialy_ write one byte to each mmap () 'ed page.
Following OSes are used: Linux-2.6.31, FreeBSD-8.0.
SATA.
Time is measured in microseconds.
Envirnoment (linux only):
scheduler anticipatory
nr_requests 1024
read_ahead_kb 0
RESULTS
~~~~~~~
I. Linux EXT3
ftruncate time: 11,789,105
mmap time: 29,794,195
sync time: 1,138,126
total time: 42,721,426
EXT3 hasn't native fallocate() implementation, so glibc uses ugly strut which
significantly degradate performance by sequential zero bytes write.
II. Linux EXT4
ftruncate time: 87,686
mmap time: 37,493,712
sync time: 476,279
total time: 38,057,677
fallocate time: 1,465,564
work time: 39,156,443
sync time: 118,039
total time: 40,740,046
III. Linux XFS
ftruncate time: 36,429,649
mmap time: 12,638,933
sync time: 109,912
total time: 49,178,494
fallocate time: 60,449,098
work time: 8,114,137
sync time: 97,437
total time: 68,660,672
with mount option 'nobarrier':
ftruncate time: 84,547,748
mmap time: 25,923,368
sync time: 463,249
total time: 110,934,365
Kernel hang up on fallocate call (xfs_iowait_end).
IV. Linux Reiser3
ftruncate time: 7,298,345
mmap time: 37,633,576
sync time: 1,372,845
total time: 46,304,766
No native fallocate() implementation.
V. Linux JFS
ftruncate time: 27,337
mmap time: 38,026,407
sync time: 472,908
total time: 38,526,652
No native fallocate() implementation.
VI. Linux NILFS2 (log-structured)
ftruncate time: 10,746
mmap time: 133,163,126
sync time: 82,204
total time: 133,256,076
VII. Linux BtrFS
ftruncate time: 6,362,707
mmap time: 29,376,188
sync time: 697,479
total time: 36,436,374
fallocate time: 1,011,155
work time: 33,286,975
sync time: 1,051,298
total time: 35,349,428
with enabled transparent compression (zlib):
ftruncate time: 2,501,566
mmap time: 40,978,856
sync time: 81,784
total time: 43,562,206
fallocate time: 1,635,162
work time: 32,520,697
sync time: 1,089,237
total time: 35,245,096
with default IO settings:
ftruncate time: 7,841,727
mmap time: 36,649,721
sync time: 2,041,199
total time: 46,532,647
VIII. FreeBSD-8.0 UFS2 with soft updates and access time optimization:
ftruncate time: 194,578,591
work time: 127,750,409
sync time: 164,474
total time: 322,493,474
FreeBSD hasn't fallocate () or any analogues.
IX. FreeBSD ZFS
ftruncate time: 15,900,672
work time: 184,591,076
sync time: 340,969
total time: 200,832,717
ZFS compressed = gzip:
ftruncate time: 17,853,223
work time: 164,578,902
sync time: 117,330
total time: 182,549,455
and the code of the test (inklyudy not included - Learn they swear, I do not know how to turn off):
/ *
* IM Storage workflow emulation to benchmark different filesystems.
* /
/ / file size must be significantly greater than available RAM
# define MSIZE ((size_t) 2 * 1024 * 1024 * 1024)
# define ESIZE ((size_t) 2 * 1024 * 1024) / / extent size
# define time_count (id) \\
do {\\
struct timeval tv; \\
if (gettimeofday (& tv, NULL)) {\\
perror("gettimeofday"); \
exit(1); \
} \
t ## id += tv.tv_sec * 1000000 + tv.tv_usec - tLast; \
tLast = tv.tv_sec * 1000000 + tv.tv_usec; \
} while (0)
int
main(int argc, char* argv[])
{
if (argc < 3) {
std::cerr << "please specify test file location and"
" bool value (1 int fd = open(path, O_RDWR MSIZE / ESIZE; ++e) {
#ifndef __FreeBSD__ // FreeBSD hasn't fallocate analog
if (strncmp(argv[2], "1", 1) == 0) {
method = "fallocate";
if (posix_fallocate(fd, e * ESIZE, ESIZE)) {
perror("fallocate");
exit(1);
}
} else
#endif
{
method = "ftruncate";
if (ftruncate(fd, (e + 1) * ESIZE)) {
perror("ftruncate");
exit(1);
}
}
time_count(Init);
maps[e] = mmap(NULL, ESIZE, PROT_WRITE
exit(1);
}
time_count(Sync);
// show statistic
std::cout << "\t" << method << " time: " << tInit << std::endl;
std::cout << "\twork time: " << tWork << std::endl;
std::cout << "\tsync time: " << tSync << std::endl;
std::cout << "\ttotal time: " << (tInit + tWork + tSync) \u0026lt;\u0026lt;Std:: endl;
if (unlink (path)) {
perror ("unlink");
exit (1);
}
return 0;
}
Subscribe to:
Posts (Atom)