U
U
user.2022-02-28 19:33:38
Parsing
user., 2022-02-28 19:33:38

Why does the hoster's parser work slower than on a home virtual machine?

I wrote a parser in python and tested it on my virtual machine with these characteristics:

processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 165
model name	: Intel(R) Core(TM) i5-10300H CPU @ 2.50GHz
stepping	: 2
cpu MHz		: 2496.000
cache size	: 8192 KB
physical id	: 0
siblings	: 1
core id		: 0
cpu cores	: 1
apicid		: 0
initial apicid	: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 22
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid tsc_known_freq pni pclmulqdq monitor ssse3 cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single fsgsbase avx2 invpcid rdseed clflushopt md_clear flush_l1d arch_capabilities
bugs		: spectre_v1 spectre_v2 spec_store_bypass swapgs itlb_multihit
bogomips	: 4992.00
clflush size	: 64
cache_alignment	: 64
address sizes	: 39 bits physical, 48 bits virtual
power management:

In machine settings: 2Gb RAM, 1CPU.

I also took a simple VPS server, with the same amount of RAM and the number of cores (CPU is even faster):
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 85
model name      : Intel Xeon Processor (Skylake, IBRS)
stepping        : 4
microcode       : 0x1
cpu MHz         : 2900.000
cache size      : 16384 KB
physical id     : 0
siblings        : 1
core id         : 0
cpu cores       : 1
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology cpuid tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single pti ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx avx512f avx512dq rdseed adx smap clflushopt clwb avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 arat pku ospke avx512_vnni md_clear
bugs            : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs taa itlb_multihit
bogomips        : 5800.00
clflush size    : 64
cache_alignment : 64
address sizes   : 46 bits physical, 48 bits virtual
power management:


A small network test:
Before starting, for the sake of interest, I pinged from the VPS to the resource from which I collect information, the maximum value: 1.97 ms. I also pinged from a home virtual machine: 22.8 ms got a value ten times higher.

The whole point is that this parser works twice as fast on my home virtual machine, despite the fact that the ping differs ten times not for the better (it is clear that ideally you need to measure the upload speed with curl or something else, but for For simplicity, I just pinged at the beginning), and my CPU, apparently, is also weaker. Actually how is it? Is the host crazy? Or am I missing some technical point?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
ScriptKiddo, 2022-02-28
@ScriptKiddo

If the load is 100% and the speed is not enough - try another hosting provider, where the oversell is less.
If the load is less than 100% - distribute the task across threads or use asynchronous libraries

D
Dr. Bacon, 2022-02-28
@bacon

1. ping says nothing about speed
2. VPS is of course weaker, all users of the host machine share resources, except for this, you don’t know anything about how it is actually done by the host.
3. turn on logging and see where the differences are, whether it's a network or a cpu.

O
Oleg, 2022-02-28
@402d

https://vc.ru/services/87999-prostaya-instrukciya-...
strange? what else ban on SP is not grabbed

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question