Subject | Re: 1.5.3 SS: need to run long-running queries with low prio - how? |
---|---|
Author | Ali Gökçen |
Post date | 2006-03-13T01:34:56Z |
Hi Adam,
what bottleneck may be here?
fetch something statement
sleep for a short time (with UDF or internal cpu loop)
insert statement
bottleneck is on the DISC I/O not on the CPU.
DISC cause bottleneck because it is a mechanical device and has
unstable response(access+fetch) times.
if u use the sleeper UDF inside of a statement, it may increase time
lost because of internal locks. Select and insert statements has
short time, fast internal locks and effects minimal other users.
Also, my advice was about waiting between SQL statements, Firebird
engine will be unlocked position.
firebird proccesses unawered each other for system level.
they are awered only file level mechanic lock info.
so, if you reduce some firebird process priority with giving more
priority others, this will cause disaster, because too late
releasing locked rows and system resources cause another bottleneck
with electronic level too.
which has advantage? do force to wait a user or do force every user?
My education was on system/370. multiproccessing, timesharing,
multitasking, resource sharing etc. these terms may be new for PC
based people.
somebody uses this time to prepare or calculate something on CPU and
somebody can send some hundreds read/write command to disc, because
of they have no much calculation on CPU.
in shortly, somebody works heavly on file, somebody on CPU.
DISC operations are in anarchy.
write a program, it may be even in low priorty,
only read and write something from/to HD (or CDROM) randomly other
than FDB file. you will se Firebird users will lost their responses,
it is not about CPU.
Regards.
Ali
> I would avoid sleeping the thread as this could potentially causemore
> bottlenecks then it resolves, especially if another thread has towait
> for the sleepy one to wake to release a lock.I don't think so.
what bottleneck may be here?
fetch something statement
sleep for a short time (with UDF or internal cpu loop)
insert statement
bottleneck is on the DISC I/O not on the CPU.
DISC cause bottleneck because it is a mechanical device and has
unstable response(access+fetch) times.
if u use the sleeper UDF inside of a statement, it may increase time
lost because of internal locks. Select and insert statements has
short time, fast internal locks and effects minimal other users.
Also, my advice was about waiting between SQL statements, Firebird
engine will be unlocked position.
>process
> If you switched to classic, then a UDF call could retrieve the
> ID and you could use that to change the priority class. I do notknow
> if this is advisable but it would certainly be less dangerous thani think playing classic proccesses priorty very very dengerous.
> sleeping the thread.
firebird proccesses unawered each other for system level.
they are awered only file level mechanic lock info.
so, if you reduce some firebird process priority with giving more
priority others, this will cause disaster, because too late
releasing locked rows and system resources cause another bottleneck
with electronic level too.
which has advantage? do force to wait a user or do force every user?
My education was on system/370. multiproccessing, timesharing,
multitasking, resource sharing etc. these terms may be new for PC
based people.
>queries
> Remember though that there is an overhead in slowing down the
> in that there is a far greater garbage buildup and any locks willbe
> around for much longer, so I find it is usually better to get itover
> with quicker.meant to
>
> You mention two tables and seem to toggle between them. Is there a
> reason for doing it this way? If it is just an information lookup,
> then you could put the data into a new database (on a different
> machine) and then put the database in and change the alias.
>
> Also, the hardware is relatively modest for something that is
> be both a database server, web server as well as handling datapumping.
>Adam, imagine, there is 100 users and everybody has 10 ms to run...
> Adam
>
somebody uses this time to prepare or calculate something on CPU and
somebody can send some hundreds read/write command to disc, because
of they have no much calculation on CPU.
in shortly, somebody works heavly on file, somebody on CPU.
DISC operations are in anarchy.
write a program, it may be even in low priorty,
only read and write something from/to HD (or CDROM) randomly other
than FDB file. you will se Firebird users will lost their responses,
it is not about CPU.
Regards.
Ali