Heavy SQL Database Load (1 Viewer)

jimbeam128

Portal Pro
December 16, 2008
169
19
Home Country
Germany Germany
Hello everybody,

I´ve got a fresh installation of Win XP SP3 with Mediaportal 1 RC4 and TV-Server. I have installed with SQL Express engine.

I´ve got 2 GB of Ram and when I have a look at the TaskManager, I can see after a few hours that the SQL-Service consumes about 900 MB of Ram. Is this normal? I can´t believe that the Mediaportal Database needs such a lot of power.
What are your experiences...!?
 

Cybertex

Portal Pro
August 9, 2007
200
14
Milano
Home Country
Italy Italy
Hello everybody,
I´ve got 2 GB of Ram and when I have a look at the TaskManager, I can see after a few hours that the SQL-Service consumes about 900 MB of Ram. Is this normal? I can´t believe that the Mediaportal Database needs such a lot of power.
What are your experiences...!?

Hi,
you can limit the amount of memory used by SQLServer. Open SQL Server Management Studio, on the left pane, select "local" and right-click on it. On the properties, find memory settings and put a limit on upper memory. 128 is enough ;)

Restart the service and you're done.

Edit:
of course, restart "SQLServer" service

Ciao
 

jimbeam128

Portal Pro
December 16, 2008
169
19
Home Country
Germany Germany
I found a thread and that worked for me:

Here an extract for that thread:

This is for SBS SQL Monitoring Database, but works also for all other databases. Just enter it in the command line.

Then you do not have to install the SQL Server Management Studio on your htpc or any other computer....:D



So, how to limit RAM usage for SBS SQL monitoring database?

First, go with your Task Manager and under
View -> Select Columns
check PID and Virtual Memory Size.

Then see PID for the sqlservr.exe process which consumes large amount of RAM.

Then go to CMD Command prompt and enter this command:

tasklist /svc | find "sql"

You'll get something like this:
Koda:
C:>tasklist /svc|find "sql"
sqlservr.exe 1628 MSSQL$MICROSOFT##SSEE
sqlservr.exe 1724 MSSQL$SBSMONITORING
sqlagent.EXE 2868 SQLAgent$SBSMONITORING
sqlwriter.exe 2952 SQLWriter
sqlmangr.exe 10832 N/A


Find the PID from Task Manager in the list from this command. Most probably it is MSSQL$SBSMONITORING process which is guilty for large RAM consumption.

If this is true, you may limit it via Command prompt entering these commands (what you need to type is marked bold):

C:>osql -E -S SERVERNAME\SBSMONITORING
1> sp_configure 'show advanced options',1
2> reconfigure with override
3> go
Configuration option 'show advanced options' changed from 0 to 1. Run the
RECONFIGURE statement to install.
1> sp_configure 'max server memory',70
2> reconfigure with override
3> go
DBCC execution completed. If DBCC printed error messages, contact your system
administrator.
Configuration option 'max server memory (MB)' changed from 2147483647 to 70.
Run the RECONFIGURE statement to install.
1> exit
C:>

Note: Replace SERVERNAME, SBSMONITORING and number 70 with values to match your system!

As you see, by design SBS monitoring database has a limit of 2147483647 MB of memory, so it can eat up practically all your RAM!
The 70 MB limit here shown is just a guess, and my recommendation is to use some value between 70 and 300, depending on your free RAM.

Have your Task Manager open and watch your sqlservr.exe process how it releases RAM imidiatelly after you issue these commands. Many people have used this hack and all are happy with server behaviour. No side effects have been noticed (as far as I know).
 

Paranoid Delusion

Moderation Manager
  • Premium Supporter
  • June 13, 2005
    13,052
    2,978
    Cheshire
    Home Country
    United Kingdom United Kingdom
    I´ve got 2 GB of Ram and when I have a look at the TaskManager, I can see after a few hours that the SQL-Service consumes about 900 MB of Ram.

    And your problem is !!

    Never seen this cause any problems whatsoever, even whilst transcoding video.

    Glad your happy now though.
     

    Cybertex

    Portal Pro
    August 9, 2007
    200
    14
    Milano
    Home Country
    Italy Italy
    I found a thread and that worked for me:

    Here an extract for that thread:

    This is for SBS SQL Monitoring Database, but works also for all other databases. Just enter it in the command line.

    Then you do not have to install the SQL Server Management Studio on your htpc or any other computer....:D

    Hi, this is correct, but is a bit pointless ;)

    The search for the process who is eating memory is useless; there is only a SQL Server Instance, named "SQLEXPRESS", and only 1 sqlservr.exe running (SQLAgent doesn't exist in SQL Server Express edition).

    It's enough to run the commands using "<servername>\SQLEXPRESS" as connection ;)
     

    jimbeam128

    Portal Pro
    December 16, 2008
    169
    19
    Home Country
    Germany Germany
    You´re right. Forgot to post that... ;-)

    Paranoid Delusion: My point of view is, when a program consumes such a lot of memory, I am asking WHY. And when there is no reason for such an overhead, I wan to reduce it. And that has been done now...
     

    Rodge

    New Member
    February 12, 2007
    3
    0
    51
    Home Country
    Sweden Sweden
    You´re right. Forgot to post that... ;-)

    @Paranoid Delusion: My point of view is, when a program consumes such a lot of memory, I am asking WHY. And when there is no reason for such an overhead, I wan to reduce it. And that has been done now...

    Just a comment...
    That´s just the way MS SQL Server works.
    Why?
    If you don´t restrict the amount of memory SQL is allowed to allocate it will allocate it all after a while.
    And that´s because it caches database queries and data in RAM rather than getting it from the much slower hard drive.

    So, by design.

    /Roger
     

    Users who are viewing this thread

    Top Bottom