|
Using Solaris temp filesystem tmpfs for a Sybase tempdb device
|
|
07-01-2009, 02:11 AM
Post: #1
|
|||
|
|||
|
Using Solaris temp filesystem tmpfs for a Sybase tempdb device
Background
Adaptive Server devices usually are raw devices or file system devices. Solaris users have a third option, tmpfs, for tempdb. tmpfs -- the temporary file system -- caches writes only for a session. Files are not preserved across operating system reboots. Should you use tmpfs? To determine whether tmpfs would benefit your system, perform benchmarks comparing the memory assigned to tmpfs versus the memory assigned to the data cache. Usually, it is more effective to give extra memory to the server for use as general data cache rather than creating a tmpfs device for tempdb. If tempdb is used heavily, then it will use a fair share of the data cache. If tempdb is not used often, then the server can use the memory assigned to data cache for non-tempdb data processing, but if the memory is assigned for tempfs it is wasted. Servers that are most likely to benefit from using tmpfs are those that are already near the addressable memory limit: * For Sybase SQL Server 11.0.x, see TechNote 20239: Addressable Memory Limits for Sybase SQL Server 11.0.x . * For Adaptive Server Enterprise 11.5.x, see TechNote 20101: Addressable Memory Limits in Adaptive Server Enterprise 11.5.x . * For Adaptive Server 11.9.2, the limits generally are the same as in TechNote 20101. Addressable memory in Adaptive Server 11.9.3 generally is 4TB, and therefore tmpfs may not be as beneficial. Creating a tmpfs device Follow these steps: 1. Create and test an operating system startup script that creates tmpfs after every operating system reboot. See the Solaris man page on tmpfs for details on creating a tmpfs filesystem. 2. Create the tmpfs device with disk init just like creating any other filesystem device, except that you are specifying the tmpfs filesystem you just created. For example, if you named and mounted it as "/mytmpfs": 1> use master 2> go 1> disk init name = "tempdb1_dev1", 2> physname = "/mytmpfs/tempdb", 3> vdevno = 3, size = 102400 4> go This creates a 200MB device for tempdb on the /mytmpfs device. 3. Use alter database to extend tempdb to the tmpfs device: 1> alter database tempdb 2> on tempdb1 = 200 3> go 4. Modify your RUN_Server file to issue a UNIX touch command against tempdb on the tmpfs device before the call to the dataserver. This creates the file if it does not exist, as might happen if the operating system had been rebooted. Upon startup, the server can activate the device and rewrite tempdb. If the file entry was missing, the server would not be able to activate it and tempdb would not be available. Ref: http://www.sybase.com/detail?id=20448 Source & Copyright : Sybase,Inc. |
|||
|
« Next Oldest | Next Newest »
|


Chat Support
Search
Disclaimer & Rules
Help


