Category Archives: Uncategorized

E3 1220 1TB 8GB yabs test

root@sd-55570:/tmp# curl -sL yabs.sh | bash
# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #
#              Yet-Another-Bench-Script              #
#                     v2022-08-20                    #
# https://github.com/masonr/yet-another-bench-script #
# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #

Thu Oct 13 22:23:02 UTC 2022

Basic System Information:
---------------------------------
Uptime     : 1 days, 1 hours, 15 minutes
Processor  : Intel(R) Xeon(R) CPU E31220 @ 3.10GHz
CPU cores  : 4 @ 1607.358 MHz
AES-NI     : ✔ Enabled
VM-x/AMD-V : ✔ Enabled
RAM        : 7.8 GiB
Swap       : 1.0 GiB
Disk       : 914.3 GiB
Distro     : Ubuntu 18.04.6 LTS
Kernel     : 4.15.0-194-generic

fio Disk Speed Tests (Mixed R/W 50/50):
---------------------------------
Block Size | 4k            (IOPS) | 64k           (IOPS)
  ------   | ---            ----  | ----           ----
Read       | 912.00 KB/s    (228) | 12.86 MB/s     (200)
Write      | 951.00 KB/s    (237) | 13.49 MB/s     (210)
Total      | 1.86 MB/s      (465) | 26.35 MB/s     (410)
           |                      |
Block Size | 512k          (IOPS) | 1m            (IOPS)
  ------   | ---            ----  | ----           ----
Read       | 53.07 MB/s     (103) | 60.58 MB/s      (59)
Write      | 56.12 MB/s     (109) | 64.90 MB/s      (63)
Total      | 109.19 MB/s    (212) | 125.49 MB/s    (122)

iperf3 Network Speed Tests (IPv4):
---------------------------------
Provider        | Location (Link)           | Send Speed      | Recv Speed
                |                           |                 |
Clouvider       | London, UK (10G)          | 939 Mbits/sec   | 938 Mbits/sec
Online.net      | Paris, FR (10G)           | 941 Mbits/sec   | 942 Mbits/sec
Hybula          | The Netherlands (40G)     | 937 Mbits/sec   | 936 Mbits/sec
Uztelecom       | Tashkent, UZ (10G)        | 887 Mbits/sec   | 315 Mbits/sec
Clouvider       | NYC, NY, US (10G)         | 896 Mbits/sec   | 282 Mbits/sec
Clouvider       | Dallas, TX, US (10G)      | 868 Mbits/sec   | 131 Mbits/sec
Clouvider       | Los Angeles, CA, US (10G) | 849 Mbits/sec   | 273 Mbits/sec

Geekbench 5 Benchmark Test:
---------------------------------
Test            | Value
                |
Single Core     | 741
Multi Core      | 2216
Full Test       | https://browser.geekbench.com/v5/cpu/17935609

HestiaCP

Every time I make changes to this panel, like open basedir in apache or PHPFPM, I need to rebuild web profile from admin panel. This is essential or it will not work.

Copy from folder to folder preserving everything

Either use

sudo cp -rp /home/folder /media/backup/folder

sudo cp -a /home/folder /media/backup/folder (UPDATE: use this one!!!preserves everything)

Or use:

 rsync -avz
-p     same as --preserve=mode,ownership,timestamps

 --preserve[=ATTR_LIST]
          preserve the specified attributes (default: mode,ownership,timestamps),
          if possible additional attributes: context, links, xattr, all

Source: https://unix.stackexchange.com/questions/43605/how-do-i-copy-a-folder-keeping-owners-and-permissions-intact

Note to myself – ODS and mysql

When importing data you have got from the datacenter (statistical files) use first openoffice .ods format and import it into already built table (copied table with all the structure) and then just import files to that table. Make sure that openoffice sheet is the same name as db table.

If you previously made table (copied table from table you were using before) then the data will just be imported automatically. You might have some problems with columns number but predefined table (copied) must be the same fields count as with .ods file you are importing.

End of note to myself

MySQL rand function

If you need to add some random number to some of the mysql columns then here it goes…

UPDATE tableSET column = FLOOR( 1 + RAND( ) *100 )

The last number (100) means you are about to add any value until 100. So 99, 1, 5, 33, 45…any between 1 and 100.
If you put 10 instead of 100 then you will get between 1 and 10 (2, 5, 6).

Returns a random floating-point value v in the range 0 <= v < 1.0.

RAND

That’s it.

Rsync on different port then 22

If you need to use rsync for data transfer (fast) from box to box and you have different ssh port setup then this use this:

rsync -avz -e "ssh -p $port" user@remoteip:/path/to/data/ /local/path/data/

or vice versa

rsync -avz -e "ssh -p $port" /local/path/data/ user@remoteip:/path/to/data/

Mysql & PHP utf8 problem

Recently I had to write some software for the company I’m working for. It’s web application for converting raw exported data from Oracle database to human readable excel file. And it’s not naive app. Not at all. I am still responsible for cca 200.000 entries and upper top management makes decisions relying on this app. So it’s serious.

updated: problem solved long time ago, I can’t remember what was it. I think I did convert data from the php end. That way mysql tables left intact.