马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?站点注册
×
Placing tempdb on a RAM disk
First, add RAM disk support to your kernel by setting CONFIG_BLK_DEV_RAM = 1.
This can be done by running make menuconfig or make xconfig
in the /usr/src/linux directory and enabling RAM disk support in
the Block Devices section.
You need to rebuild your kernel for this to take effect.
Stefan Goebel wrote this on
sybase.public.sqlserver.linux:
- 1. The default max size of a RAM disk is 20mb. You probably want to
increase this by setting rd_size in drivers/block/rd.c from
204800 to 102400 (for a 100mb max size, for example).
- 2. Create the RAM disk, mount it, and then create the new Sybase device
for tempdb. Something like this should work to create the filesystem:
troll#> /sbin/mke2fs -q -m0 /dev/ram 52000 -F > /dev/null troll#> /bin/mount /dev/ram /opt/sybase/tempdb -t ext2 > /dev/null troll#> /bin/chown sybase:sybase /opt/sybase/tempdb troll#> /bin/touch /opt/sybase/tempdb/tempspace.dat troll#> /bin/chown sybase:sybase /opt/sybase/tempdb/tempspace.dat
Now we need to move tempdb from master to this new file. So we need to
create a Sybase device, and then extend tempdb to this new device:
1> disk init name="tempdbdev", physname="/opt/sybase/tempdb/tempspace.dat", vdevno=XX, size=26000 (replace XX with the correct vdevno!) 2> go
是不是在内存中建tempdbdev设备呀? |