I have two questions about CPU and memory usage during GLSL execution in the unix-like (multiuser and multitasking) OS, eg. Linux,FreeBSD.

First question:CPU usage
------------------------
When executing computation intensive shader, CPU usage, which can be checked by "ps" command, shows 90% or more. If GPU does execute the computation, I think,CPU should be "idling". What is the reason of high CPU usage?

Second question:Memory usage
----------------------------
When using texture, memory usage (VSZ and RSS colum in the result of "ps" command) grows by the size of the texture after glTexImage2D execution. This indicates the texture is not in the GPU memory but in the main memory? Is this true? That can not be true, I think. Then,the texture resides in both GPU and CPU. Is that so?

Thanks in advance

Korval

12-15-2004, 10:51 AM

1: You have likely executed some function that blocks on the GPU. Since the GPU is being held up by your shader, the CPU gets held up. Texture swaps, and some state changes can be blocking calls.

2: Textures are, quite likely, stored in both on-card memory and main system memory.