productivity/khard (or python) seem slow

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

productivity/khard (or python) seem slow

Joel Carnat
Hello,

I've just setup vdirsync and khard to sync my addressbook from
nextcloud. It works but querying the local vcf is damm slow. I also
noticed that ranger felt a bit slow to start but thought it was the
software ; so I switched to nnn.

# time (khard list | wc -l)
     112
     0m07.10s real     0m04.08s user     0m02.99s system

Is this an issue with my VM (2 vCPU / 4GB RAM / 20GB SSD) or are Python
software just slow?

Thanks.

Reply | Threaded
Open this post in threaded view
|

Re: productivity/khard (or python) seem slow

Paco Esteban
Hi Joel,

On Wed, 15 May 2019, Joel Carnat wrote:

> Hello,
>
> I've just setup vdirsync and khard to sync my addressbook from
> nextcloud. It works but querying the local vcf is damm slow. I also
> noticed that ranger felt a bit slow to start but thought it was the
> software ; so I switched to nnn.
>
> # time (khard list | wc -l)
>      112
>      0m07.10s real     0m04.08s user     0m02.99s system
>
> Is this an issue with my VM (2 vCPU / 4GB RAM / 20GB SSD) or are Python
> software just slow?

Can't say about your VM. On my desktop:

  $ time (khard list | wc -l)
       104
  ( khard list | wc -l; )  0.51s user 0.25s system 97% cpu 0.779 total

Ranger works just fine. It takes less than a second to start.

Cheers,

--
Paco Esteban.
https://onna.be/gpgkey.asc
9A6B 6083 AD9E FDC2 0EAF  5CB3 5818 130B 8A6D BC03

Reply | Threaded
Open this post in threaded view
|

Re: productivity/khard (or python) seem slow

Joel Carnat
On Thu 16/05 08:55, Paco Esteban wrote:

> Hi Joel,
>
> On Wed, 15 May 2019, Joel Carnat wrote:
>
> > Hello,
> >
> > I've just setup vdirsync and khard to sync my addressbook from
> > nextcloud. It works but querying the local vcf is damm slow. I also
> > noticed that ranger felt a bit slow to start but thought it was the
> > software ; so I switched to nnn.
> >
> > # time (khard list | wc -l)
> >      112
> >      0m07.10s real     0m04.08s user     0m02.99s system
> >
> > Is this an issue with my VM (2 vCPU / 4GB RAM / 20GB SSD) or are Python
> > software just slow?
>
> Can't say about your VM. On my desktop:
>
>   $ time (khard list | wc -l)
>        104
>   ( khard list | wc -l; )  0.51s user 0.25s system 97% cpu 0.779 total
>

Is this on OpenBSD ? The time output looks different.

Replaying the whole scenario on a real hardware (ThinkPad X260), things
are a little bit better. But not that fast.
# time (khard list | wc -l)
     114
    0m02.49s real     0m01.35s user     0m01.06s system

Feels as slow as Firefox to start. Really annoying for a "simple"
console application. It requires seconds to look for a contact when
queried from Mutt.

> Ranger works just fine. It takes less than a second to start.

Ranger is also a bit better but not that much. About 1 or 2 seconds to
launch. When top or mutt are starting nearly instantaneous.

Reply | Threaded
Open this post in threaded view
|

Re: productivity/khard (or python) seem slow

Paco Esteban
On Thu, 16 May 2019, Joel Carnat wrote:

> On Thu 16/05 08:55, Paco Esteban wrote:
> > Can't say about your VM. On my desktop:
> >
> >   $ time (khard list | wc -l)
> >        104
> >   ( khard list | wc -l; )  0.51s user 0.25s system 97% cpu 0.779 total
> >
>
> Is this on OpenBSD ? The time output looks different.

Of course it is ... (-current though)
That should be zsh that uses an internal builtin instead of
/usr/bin/time I guess (did not check).

Here it is on ksh with base time:

  $ time (khard list | wc -l)
       104
      0m00.81s real     0m00.59s user     0m00.21s system

Interestingly a bit slower.

Cheers,

--
Paco Esteban.
https://onna.be/gpgkey.asc
9A6B 6083 AD9E FDC2 0EAF  5CB3 5818 130B 8A6D BC03

Reply | Threaded
Open this post in threaded view
|

Re: productivity/khard (or python) seem slow

David Mimms
On 2019.05.17 11:41, Paco Esteban wrote:

>On Thu, 16 May 2019, Joel Carnat wrote:
>
>> On Thu 16/05 08:55, Paco Esteban wrote:
>> > Can't say about your VM. On my desktop:
>> >
>> >   $ time (khard list | wc -l)
>> >        104
>> >   ( khard list | wc -l; )  0.51s user 0.25s system 97% cpu 0.779 total
>> >
>>
>> Is this on OpenBSD ? The time output looks different.
>
>Of course it is ... (-current though)
>That should be zsh that uses an internal builtin instead of
>/usr/bin/time I guess (did not check).
>
>Here it is on ksh with base time:
>
>  $ time (khard list | wc -l)
>       104
>      0m00.81s real     0m00.59s user     0m00.21s system
>
>Interestingly a bit slower.

What CPU and storage are you running?

My ThinkPad P50:
 * Intel Xeon E3-1505M @ 2.80GHz
 * 2 x Samsung 960 PRO PCIe NVMe (OpenZFS mirror)
 * O/S: Debian Buster

Results:
$ time (khard list | wc -l)
265
( khard list | wc -l; )  0.91s user 0.04s system 100% cpu 0.950 total


My ThinkPad X1 Carbon (4th gen)
 * Intel Core i7-6600U @ 2.60GHz (Hyper-threading disabled)
 * 1 x Samsung MZ-NLN512 SATA
 * O/S: OpenBSD 6.5 -current

Results:
$ time (khard list | wc -l)
     265
( khard list | wc -l; )  2.44s user 2.03s system 100% cpu 4.459 total

The OpenZFS mirror is noticeably slower than a single 960 PRO formatted
as ext4.  Since the X1 has a SATA drive in it, I'll eventually have to
install OpenBSD on my spare Samsung 960 PRO in order to improve overall
performance.

I also tested OpenBSD 6.[45] in VMware Workstation Pro on my P50, and
it ran extremely slow.  So slow that it was unusable.  I figure it's
not optimized for virtualization?  FreeBSD, Linux, and Windows all run
fine in my VMware.

Best regards,

David Mimms
https://mim.ms

Reply | Threaded
Open this post in threaded view
|

Re: productivity/khard (or python) seem slow

snikolov
In reply to this post by Joel Carnat
I run vanilla openBSD 6.5 on oVirt (KVM) with gluster as storage and it seems OK for my needs but I never used khard.
What kind of slowness do you experience?
Maybe I can run some tests and see if the situation is the same on KVM.

Best Regards,
Strahil NikolovOn May 18, 2019 18:39, David Mimms <[hidden email]> wrote:

>
> On 2019.05.17 11:41, Paco Esteban wrote:
> >On Thu, 16 May 2019, Joel Carnat wrote:
> >
> >> On Thu 16/05 08:55, Paco Esteban wrote:
> >> > Can't say about your VM. On my desktop:
> >> >
> >> >   $ time (khard list | wc -l)
> >> >        104
> >> >   ( khard list | wc -l; )  0.51s user 0.25s system 97% cpu 0.779 total
> >> >
> >>
> >> Is this on OpenBSD ? The time output looks different.
> >
> >Of course it is ... (-current though)
> >That should be zsh that uses an internal builtin instead of
> >/usr/bin/time I guess (did not check).
> >
> >Here it is on ksh with base time:
> >
> >  $ time (khard list | wc -l)
> >       104
> >      0m00.81s real     0m00.59s user     0m00.21s system
> >
> >Interestingly a bit slower.
>
> What CPU and storage are you running?
>
> My ThinkPad P50:
> * Intel Xeon E3-1505M @ 2.80GHz
> * 2 x Samsung 960 PRO PCIe NVMe (OpenZFS mirror)
> * O/S: Debian Buster
>
> Results:
> $ time (khard list | wc -l)
> 265
> ( khard list | wc -l; )  0.91s user 0.04s system 100% cpu 0.950 total
>
>
> My ThinkPad X1 Carbon (4th gen)
> * Intel Core i7-6600U @ 2.60GHz (Hyper-threading disabled)
> * 1 x Samsung MZ-NLN512 SATA
> * O/S: OpenBSD 6.5 -current
>
> Results:
> $ time (khard list | wc -l)
>      265
> ( khard list | wc -l; )  2.44s user 2.03s system 100% cpu 4.459 total
>
> The OpenZFS mirror is noticeably slower than a single 960 PRO formatted
> as ext4.  Since the X1 has a SATA drive in it, I'll eventually have to
> install OpenBSD on my spare Samsung 960 PRO in order to improve overall
> performance.
>
> I also tested OpenBSD 6.[45] in VMware Workstation Pro on my P50, and
> it ran extremely slow.  So slow that it was unusable.  I figure it's
> not optimized for virtualization?  FreeBSD, Linux, and Windows all run
> fine in my VMware.
>
> Best regards,
>
> David Mimms
> https://mim.ms 
>

Reply | Threaded
Open this post in threaded view
|

Re: productivity/khard (or python) seem slow

Joel Carnat
In reply to this post by David Mimms
On Sat 18/05 11:39, David Mimms wrote:

> On 2019.05.17 11:41, Paco Esteban wrote:
> > On Thu, 16 May 2019, Joel Carnat wrote:
> >
> > > On Thu 16/05 08:55, Paco Esteban wrote:
> > > > Can't say about your VM. On my desktop:
> > > >
> > > >   $ time (khard list | wc -l)
> > > >        104
> > > >   ( khard list | wc -l; )  0.51s user 0.25s system 97% cpu 0.779 total
> > > >
> > >
> > > Is this on OpenBSD ? The time output looks different.
> >
> > Of course it is ... (-current though)
> > That should be zsh that uses an internal builtin instead of
> > /usr/bin/time I guess (did not check).
> >
> > Here it is on ksh with base time:
> >
> >  $ time (khard list | wc -l)
> >       104
> >      0m00.81s real     0m00.59s user     0m00.21s system
> >
> > Interestingly a bit slower.
>
> What CPU and storage are you running?
>

The ThinkPad is:
CPU: Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz
RAM: 8GB
DISK: C300-CTFDDAC256M connected on "Intel 100 Series AHCI" @6.0Gb/s
ROOT: <OPENBSD, SR CRYPTO, 006>

The VM runs on Synology KVM:
CPU: Intel(R) Celeron(R) CPU J3455 @ 1.50GHz
RAM: 16GB
DISK: Samsung SSD 850 EVO 1TB

Reply | Threaded
Open this post in threaded view
|

Re: productivity/khard (or python) seem slow

Joel Carnat
In reply to this post by snikolov
On Sat 18/05 19:15, Strahil wrote:
> I run vanilla openBSD 6.5 on oVirt (KVM) with gluster as storage and it seems OK for my needs but I never used khard.
> What kind of slowness do you experience?
> Maybe I can run some tests and see if the situation is the same on KVM.
>

Well, it takes several seconds to run.
Nearly 3 seconds to list only 100 cards.
From 3 to 5 seconds to issue a search from Mutt.

Reply | Threaded
Open this post in threaded view
|

Re: productivity/khard (or python) seem slow

David Mimms
In reply to this post by David Mimms
On 2019.05.18 11:39, David Mimms wrote:

>On 2019.05.17 11:41, Paco Esteban wrote:
>>On Thu, 16 May 2019, Joel Carnat wrote:
>>
>>>On Thu 16/05 08:55, Paco Esteban wrote:
>>>> Can't say about your VM. On my desktop:
>>>>
>>>>   $ time (khard list | wc -l)
>>>>        104
>>>>   ( khard list | wc -l; )  0.51s user 0.25s system 97% cpu 0.779 total
>>>>
>>>
>>>Is this on OpenBSD ? The time output looks different.
>>
>>Of course it is ... (-current though)
>>That should be zsh that uses an internal builtin instead of
>>/usr/bin/time I guess (did not check).
>>
>>Here it is on ksh with base time:
>>
>> $ time (khard list | wc -l)
>>      104
>>     0m00.81s real     0m00.59s user     0m00.21s system
>>
>>Interestingly a bit slower.
>
>What CPU and storage are you running?
>
>My ThinkPad P50:
>* Intel Xeon E3-1505M @ 2.80GHz
>* 2 x Samsung 960 PRO PCIe NVMe (OpenZFS mirror)
>* O/S: Debian Buster
>
>Results:
>$ time (khard list | wc -l)
>265
>( khard list | wc -l; )  0.91s user 0.04s system 100% cpu 0.950 total
>
>
>My ThinkPad X1 Carbon (4th gen)
>* Intel Core i7-6600U @ 2.60GHz (Hyper-threading disabled)
>* 1 x Samsung MZ-NLN512 SATA
>* O/S: OpenBSD 6.5 -current
>
>Results:
>$ time (khard list | wc -l)
>    265
>( khard list | wc -l; )  2.44s user 2.03s system 100% cpu 4.459 total
>
>The OpenZFS mirror is noticeably slower than a single 960 PRO formatted
>as ext4.  Since the X1 has a SATA drive in it, I'll eventually have to
>install OpenBSD on my spare Samsung 960 PRO in order to improve overall
>performance.
>
>I also tested OpenBSD 6.[45] in VMware Workstation Pro on my P50, and
>it ran extremely slow.  So slow that it was unusable.  I figure it's
>not optimized for virtualization?  FreeBSD, Linux, and Windows all run
>fine in my VMware.

For further comparison, I installed FreeBSD 12.0-RELEASE on my ThinkPad X1
Carbon (4th gen) that was running OpenBSD 6.5 -current and here is the
result:

$ time (khard list | wc -l)
     265
( khard list | wc -l; )  1.12s user 0.10s system 100% cpu 1.211 total

DM