[CentOS] time foo

Fri Dec 1 19:35:01 UTC 2017
Stephen John Smoogen <smooge at gmail.com>

On 1 December 2017 at 14:32, hw <hw at gc-24.de> 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 at centos.org
> https://lists.centos.org/mailman/listinfo/centos



-- 
Stephen J Smoogen.