Re: time foo

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On 1 December 2017 at 14:32, hw <hw@xxxxxxxx> wrote:
> Gordon Messmer wrote:
>>
>> On 12/01/2017 08:49 AM, hw wrote:
>>>
>>> # time foo
>>> real    43m39.841s
>>> user    15m31.109s
>>> sys     0m44.136s
>>>
>>>
>>> Almost 30 minutes have disappeared, but it actually took about that long,
>>> so what happened?
>>
>>
>>
>> I may misunderstand your question, but
>>
>> "time" is provided by the bash shell.  It may be provided by a command if
>> you are using a different shell.  When the command following the "time"
>> keyword completes, bash will print the amount of elapsed time (the amount of
>> time that passed between the command's start and its exit), the amount of
>> time the command was using the CPU and not in a sleep state, and the amount
>> of time the kernel was using the CPU to service requests from the command.
>>
>> So your "foo" application was in a sleep state for around 30 minutes of
>> the 44 minutes that passed between when you started it and when it finished.
>
>
> Hm.  Foo is a program that imports data into a database from two CVS files,
> using a connection for each file and forking to import both files at once.
>
> So this would mean that the database (running on a different server) takes
> almost two times as much as foo --- which I would consider kinda
> excruciatingly
> long because it´s merely inserting rows into two different tables after they
> were
> prepared by foo and then processes some queries to convert the data.
>
> The queries after importing may take like 3 or 5 minutes.  About 4.5 million
> rows
> are being imported.
>
> Would you consider about 20 minutes for importing as long?

That depends on a lot of things.. from drive speed to drive layout to
database to network congestion to... without that information the
question is not answerable.


>
> _______________________________________________
> CentOS mailing list
> CentOS@xxxxxxxxxx
> https://lists.centos.org/mailman/listinfo/centos



-- 
Stephen J Smoogen.
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
https://lists.centos.org/mailman/listinfo/centos




[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]


  Powered by Linux