命令如下:
[hadoop@hadoop ~]$ getconf PAGESIZE
4096
or
[hadoop@hadoop ~]$ getconf PAGE_SIZE
4096
[oracle@croracle01 ~]$ getconf -a --全的
...
POSIX_REC_MAX_XFER_SIZE
POSIX_REC_MIN_XFER_SIZE 4096
POSIX_REC_XFER_ALIGN 4096
SYMLINK_MAX
GNU_LIBC_VERSION glibc 2.5
GNU_LIBPTHREAD_VERSION NPTL 2.5
POSIX2_SYMLINKS 1
LEVEL1_ICACHE_SIZE 32768
LEVEL1_ICACHE_ASSOC 8
LEVEL1_ICACHE_LINESIZE 64
LEVEL1_DCACHE_SIZE 32768
LEVEL1_DCACHE_ASSOC 8
LEVEL1_DCACHE_LINESIZE 64
LEVEL2_CACHE_SIZE 6291456
LEVEL2_CACHE_ASSOC 24
LEVEL2_CACHE_LINESIZE 64
LEVEL3_CACHE_SIZE 0
LEVEL3_CACHE_ASSOC 0
LEVEL3_CACHE_LINESIZE 0
LEVEL4_CACHE_SIZE 0
LEVEL4_CACHE_ASSOC 0
IPV6 200112
RAW_SOCKETS 200112
...
有调整的空间
c
#include
int main(){
int a = getpagesize();
printf ("%d\n",a);
}
[hadoop@hadoop test]$ vi getpagesize.c
[hadoop@hadoop test]$ make getpagesize.c
make: Nothing to be done for `getpagesize.c'.
[hadoop@hadoop test]$ make getpagesize
cc getpagesize.c -o getpagesize
getpagesize.c: In function ‘main’:
getpagesize.c:4: warning: incompatible implicit declaration of built-in function ‘printf’
[hadoop@hadoop test]$ ls
getpagesize getpagesize.c
[hadoop@hadoop test]$ ./getpagesize
4096
[hadoop@hadoop test]$ vi getpagesize2.c
[hadoop@hadoop test]$ make getpagesize2
cc getpagesize2.c -o getpagesize2
[hadoop@hadoop test]$ ./getpagesize2
Page size on your system = 4096 bytes
[hadoop@hadoop test]$ cat getpagesize2.c
#include
#include
int main()
{
int pageSize = getpagesize();
printf("Page size on your system = %i bytes\n", pageSize);
return 0;
}
[hadoop@hadoop test]$
怎么修改呢?搞大点,据说可以提高I/O性能。在查!
没有评论:
发表评论