locked
-g startup flg or /3GB switch RRS feed

  • Question

  • Which one i have to use (most recommnded) on 32 bit Ent Edition?


    Manish

    Monday, December 31, 2012 2:18 PM

Answers

  • Hello Manish,

    In simpler terms, -g & /3GB are to be used if you are facing issues on memory lines, specifically virtual. -g is to increase your MTL area, you should use it if your application is using xprocs, dll in sql server space or ole db providers or multi-page-allocators. Few indicators to use this can be following errors in SQL Error log: "Failed Virtual Allocate Bytes: FAIL_VIRTUAL_RESERVE" or "Failed Virtual Allocate Bytes: FAIL_VIRTUAL_COMMIT".

    /3GB - is done at OS level by adding it to boot.ini file. This will make application VAS from 2 GB of user mode & 2 GB of kernel mode to 3 GB of user mode & reduce kernel mode to 1 GB.

    Additionally, from Server Memory Options "Allowing SQL Server to use memory dynamically is recommended; however, you can set the memory options manually and restrict the amount of memory that SQL Server can access. Before you set the amount of memory for SQL Server, determine the appropriate memory setting by subtracting, from the total physical memory, the memory required for the operating system, and any other instances of SQL Server (and other system uses, if the computer is not wholly dedicated to SQL Server). This difference is the maximum amount of memory you can assign to SQL Server."


    Please use Marked as Answer if my post solved your problem and use Vote As Helpful, if a post was useful to help other user's find a solution quicker.

    Tuesday, January 1, 2013 12:43 PM

All replies

  • Hi Manish,

    Before using any of these options, I suggest you to read online resources and have good understanding of affects and side affects of each.

    About /3GB, I don't recommend it if you have more than 8GB physical memory because this switch reduces Kernel Mode that is crucial for OS and keeping Page Table Entries. Under 8GB memory, it can be beneficial to increase User Mode memory for other applications, and in our case, SQL Server. 

    -g startup parameter is necessary only if you encounter error messages in SQL Server error log that indicates memory pressure. Otherwise, the default value(256MB) will be good. -g only increases the VAS reservation for non-buffer pool memory consumers, such as .NET run time, linked servers and etc. Its affect is different from /3GB.

    As conclusion, these two options do different jobs. According to system situation you may use any, both or non of them. They cannot be used in place of the other.


    • Edited by Amin Sobati Monday, December 31, 2012 2:32 PM
    Monday, December 31, 2012 2:31 PM
  • Hi

    -g and /3GB are for two completely different things. Download the book form the following link  and please read chapter 4

    http://www.simple-talk.com/books/sql-books/troubleshooting-sql-server-a-guide-for-the-accidental-dba/

    vt 


    Please mark answered if I've answered your question and vote for it as helpful to help other user's find a solution quicker


    • Edited by SimpleSQL Monday, December 31, 2012 2:37 PM
    Monday, December 31, 2012 2:36 PM
  • --here want to reduce VAS pressure.

    Manish

    Monday, December 31, 2012 2:37 PM
  • /3gb

    But strongly recon to read the book

    vt


    Please mark answered if I've answered your question and vote for it as helpful to help other user's find a solution quicker

    Monday, December 31, 2012 2:46 PM
  • --here want to reduce VAS pressure

    Manish,

    The best recommendation is migrating to 64bit platform because VAS pressure does not exist by having 8TB addressable space! If currently this is not possible, -g startup parameter can be considered as a solution. 

    You can check SQL Server error log to make sure if you have VAS pressure. One of the symptoms is this error:

    "App Domain is marked for unload due to memory pressure"

    Set -g to 384 and restart SQL Server service and monitor the error log again.

    Monday, December 31, 2012 5:52 PM
  • Hello Manish,

    In simpler terms, -g & /3GB are to be used if you are facing issues on memory lines, specifically virtual. -g is to increase your MTL area, you should use it if your application is using xprocs, dll in sql server space or ole db providers or multi-page-allocators. Few indicators to use this can be following errors in SQL Error log: "Failed Virtual Allocate Bytes: FAIL_VIRTUAL_RESERVE" or "Failed Virtual Allocate Bytes: FAIL_VIRTUAL_COMMIT".

    /3GB - is done at OS level by adding it to boot.ini file. This will make application VAS from 2 GB of user mode & 2 GB of kernel mode to 3 GB of user mode & reduce kernel mode to 1 GB.

    Additionally, from Server Memory Options "Allowing SQL Server to use memory dynamically is recommended; however, you can set the memory options manually and restrict the amount of memory that SQL Server can access. Before you set the amount of memory for SQL Server, determine the appropriate memory setting by subtracting, from the total physical memory, the memory required for the operating system, and any other instances of SQL Server (and other system uses, if the computer is not wholly dedicated to SQL Server). This difference is the maximum amount of memory you can assign to SQL Server."


    Please use Marked as Answer if my post solved your problem and use Vote As Helpful, if a post was useful to help other user's find a solution quicker.

    Tuesday, January 1, 2013 12:43 PM