Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Difference in runtime of a program when run in background vs foreground

Former Member
0 Likes
4,835

Hi,

Is running the program in background would result to better performance in terms of speed compared to foreground? If yes, what's the reason behind.

Thanks!

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
3,034

Hi,

Yes, program does run faster in background process than running in foreground. The reason is that when a program runs in foreground, it occupies a dialog work process and uses limited resources. But when a job runs in background, it uses a background work process which has more resources.

Explained [here|http://help.sap.com/saphelp_nw70/helpdata/EN/4a/2d513897110872e10000009b38f889/content.htm]

regards,

Advait

7 REPLIES 7
Read only

Former Member
0 Likes
3,035

Hi,

Yes, program does run faster in background process than running in foreground. The reason is that when a program runs in foreground, it occupies a dialog work process and uses limited resources. But when a job runs in background, it uses a background work process which has more resources.

Explained [here|http://help.sap.com/saphelp_nw70/helpdata/EN/4a/2d513897110872e10000009b38f889/content.htm]

regards,

Advait

Read only

HermannGahm
Product and Topic Expert
Product and Topic Expert
0 Likes
3,034

Hi Advait,

>

> Yes, program does run faster in background process than running in foreground.

sorry... an ABAP program will NOT run faster in background.

As could be seen from your link:

- a program in background does not have a timout limit

- a program in background can use a different memory allocation sequence (depends on configuration)

and may be able to allocate more memory than a foreground program (depends on configuration as well)

but it will not run faster... .

Kind regards,

Hermann

Read only

0 Likes
3,034

Thanks to you both,,, please ket me know which is which,,

Will it runn faster in background than in foreground or it should have no difference?

Hermann,

What are the configurations that we should look upon to check?

Thanks so much!

Read only

0 Likes
3,034

Hi ,

Yes..This is kind of confusing part. But, I do believe that background processing is fast. Generally it is because in most of the application servers the number of dialog work processes are less than the number of background work processes. But, you can always switch this functionality.

During the day time as we all work in dialog mode.So, there will be some dialog work processes allocated to us. But, the basis guys would have configured the system in such a way that all these dialog workprocesses are converted into background workprocesses.

This is how it works. But, to be frank if you really want to test all these you need to sit in production environment.

Hope the confusion is clarified

Thanks,

Babu Kilari

Read only

HermannGahm
Product and Topic Expert
Product and Topic Expert
0 Likes
3,034

Hi freishz,

no, it will not run faster.

In dialog it may be limited with a time out (check parameter rdisp/max_wprun_time).

In dialog it may use a different memory allocation strategy. The memory management

is pretty complex and depends on your operating system and setup. Please ask your

system administrators (basis) for help clarify the differences.

Kind regards,

Hermann

Read only

Former Member
0 Likes
3,034

Hi,

Logically speaking, there should not be any difference in the Run Time in back Ground vs Foreground.

If you really want to make a comparision, then you need to execute the program in both mode at the same time.

Please remember that if you run the two modes in different time, you may get incorrect result, because your program run time do depends on the server load also, which would be different at different time.

Read only

Former Member
0 Likes
3,034

the main advantage in running on background is that on back ground you dont get a time out.

Nafran