FirebirdSQL / firebird

Firebird server, client and tools
https://www.firebirdsql.org/
1.21k stars 210 forks source link

Connection priority [CORE728] #1103

Open firebird-automations opened 20 years ago

firebird-automations commented 20 years ago

Submitted by: @pcisar

Votes: 3

SFID: 807961#⁠ Submitted By: pcisar

Allow for task priority to be set by connection.

firebird-automations commented 16 years ago
Modified by: @pcisar Workflow: jira \[ 10752 \] =\> Firebird \[ 15150 \]
firebird-automations commented 12 years ago

Commented by: PizzaProgram Ltd. (szakilaci)

The fast and easy way to implement this would be insert a Sleep() interval between rows while running a query (or update...). * it could be called during DB connection: IBDataBase1.Params.Text := 'user_name=SYSDBA'#⁠13'password=masterkey'#⁠13'lc_ctype=WIN1250'#⁠13'sleep_between_rows=10 '; //0..1000 ms

OR (and) * implement into transaction params: IBTransaction1.Params.Text := 'read_committed'#⁠13'rec_version'#⁠13'nowait'#⁠13'priority_lowest ';

Reason: On many cases the 'server' is running on the same 'client' machine. One big query can "hold" the CPU on 100% for long seconds, even for minutes > making other operations impossible. :( /OFF It is a long long waited basic "feature". Saw many programmers to change to other RDBMS because of this problem. IMHO even a fast-dirty programming solution (like forcing sleep) is better than no solution.

firebird-automations commented 11 years ago

Commented by: PizzaProgram Ltd. (szakilaci)

/OFF Any Progress on this Issue ? PLEASE ! :(

firebird-automations commented 11 years ago

Commented by: PizzaProgram Ltd. (szakilaci)

/OFF still nothing ?

firebird-automations commented 11 years ago

Commented by: Desire Black (.des:.)

+1 for this. Setting priority per transaction should be essential! Waiting for this since ages too.

firebird-automations commented 7 years ago

Commented by: PizzaProgram Ltd. (szakilaci)

I've just realized: since FB v3.0 there is not possible any more to configure "wait time" in the firebird.conf file :( v2.1 and v2.5 had: UsePriorityScheduler = 1 PrioritySwitchDelay = 1000 #⁠ wait 1 sec before ... PriorityBoost = 10 #⁠ insert 10ms between every process > so the CPU has some time to "catch a breath" = run on 80% only

At FB v3.0 now there is only: ProcessPriorityLevel = 0 Witch is not so good because you can not wait a predefined time until priority should lower itself automatically.

__________________________________________________

Also there is still no SLEEP(x milliseconds) function built in yet :( - it should provide a simple solution by inserting directly into SELECT or procedures/triggers. ... like here http://stackoverflow.com/a/5328416 similar to a "home-made" UDF function like SP_SLEEP: https://gist.github.com/pilcrow/873189 __________________________________________________

So this feature became a MUST NEED one. (Or at least the SLEEP() function.)

firebird-automations commented 7 years ago

Commented by: @hvlad

> Reason: > On many cases the 'server' is running on the same 'client' machine. One big query can "hold" the CPU on 100% for long seconds, even for minutes > making other operations impossible. :(

Is it still actual (considering almost no single-cpu\core present this days) ?

> It is a long long waited basic "feature". > Saw many programmers to change to other RDBMS because of this problem Really ? Basic "feature" ? Could you point me at such feature in other DBMS ?

firebird-automations commented 7 years ago

Commented by: PizzaProgram Ltd. (szakilaci)

> "Is it still actual (considering almost no single-cpu\core present this days) ? "

YESSS ! 1. Think about EEEPCs, Thin clients (touch-PCs), Tablets, etc. 2. Even a few seconds of delay on a quick-sale or restaurant environment can cause huge problems. 3. Usually the firebird.conf is configured to use ALL cores, if there are more than one > but even if just 1 core from 2 would block everything 1 minute long for 100%, while win-defender is using 100% on the other core = catastrophe. (I'm experiencing all these as real life, "everyday problems" on hundreds of machines. 20%-single core, 75%-dual core, 5% more.)

_________________________

It would be really really nice, if ALL 3 features would be possible:

1.) Put SLEEP(2) into long running selects or procedures

2.) handle priority on transactions OR on selects

3.) configure .conf files to handle it automatically, just like before at prev. versions.

firebird-automations commented 5 years ago

Commented by: PizzaProgram Ltd. (szakilaci)

Maybe possible to implement to Firebird 4.0+ ?