- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Kernel memory page size
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-07-2004 08:05 PM
тАО09-07-2004 08:05 PM
Unfortunately I at the moment cannot query the knowledge base, that's why I post this once again, sorry.
kmtune reports 4 KB page size.
The unistd.h header file has a deviating (to my understanding) preprocessor macro definition.
How come?
# uname -srv;getconf KERNEL_BITS
HP-UX B.11.00 U
64
# grep _SC_PAGE_SIZE /usr/include/sys/unistd.h
# define _SC_PAGE_SIZE 3001 /* PAGE_SIZE: Software page size */
# define _SC_PAGESIZE _SC_PAGE_SIZE
# kmtune -lq vps_pagesize
Parameter: vps_pagesize
Value: 4
Default: 4
Minimum: -
Module: -
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-07-2004 08:14 PM
тАО09-07-2004 08:14 PM
Re: Kernel memory page size
_SC_PAGE_SIZE is used to call sysconf to
get the current pagesize.
## more m.c
#include
main()
{
printf ("PAGESIZE= %ld\n",sysconf(_SC_PAGE_SIZE));
}
cc m.c -o m
./usr/ccs/bin/ld: (Warning) At least one PA 2.0 object file (m.o) was detected. The linked output may not run on a PA 1.x system.
# ./m
PAGESIZE= 4096
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-07-2004 08:15 PM
тАО09-07-2004 08:15 PM
Re: Kernel memory page size
_SC_PAGE_SIZE is used to call sysconf to
get the current pagesize.
## more m.c
#include
main()
{
printf ("PAGESIZE= %ld\n",sysconf(_SC_PAGE_SIZE));
}
cc m.c -o m
./usr/ccs/bin/ld: (Warning) At least one PA 2.0 object file (m.o) was detected. The linked output may not run on a PA 1.x system.
# ./m
PAGESIZE= 4096
# getconf PAGE_SIZE
4096
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-07-2004 08:43 PM
тАО09-07-2004 08:43 PM
Re: Kernel memory page size
yes, I should have found out myself by looking at the manpages of sysconf() syscall and the getconf utility.
However, now I've come accross yet another oddity, i.e. the _SC_CLK_TCK
I also compiled your little C snippet
$ cat psize.c
#include
int main(void) {
printf("Pagesize=%u\n", sysconf(_SC_PAGE_SIZE));
printf("Clockticks=%u\n", sysconf(_SC_CLK_TCK));
return(0);
}
$ ./psize
Pagesize=4096
Clockticks=100
However when I query the kernel I get another clock speed displayed
$ echo itick_per_usec/D|su root -c "adb /stand/vmunix /dev/kmem"
Password:
Error from elf64_getehdr(application core file)
Not an Elf file: No Elf header
itick_per_usec:
itick_per_usec: 440
Any explanation?
To my relieve I can even use Perl for those queries.
$ perl -MPOSIX -e 'printf"Clockticks=%u\n",POSIX::sysconf(POSIX::_SC_CLK_TCK)'
Clockticks=100
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-07-2004 10:02 PM
тАО09-07-2004 10:02 PM
Solution> Pagesize=4096
> Clockticks=100
This means 100 ticks/sec
However when I query the kernel I get another clock speed displayed
> $ echo itick_per_usec/D| adb /stand/vmunix /dev/kmem
> itick_per_usec:
> itick_per_usec: 440
> Any explanation?
iticks_per_usec is the number of cpu cycles per microsec.
This means you have a 440Mhz cpu.
iticks are relative to itimer - register CR16 of the cpu-
To my relieve I can even use Perl for those queries.
$ perl -MPOSIX -e 'printf"Clockticks=%u\n",POSIX::sysconf(POSIX::_SC_CLK_TCK)'
Clockticks=100
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-08-2004 02:00 AM
тАО09-08-2004 02:00 AM
Re: Kernel memory page size
What vps_pagesize controls is (with vps_ceiling) the hint to the kernel of what virtual page size (aka large page) to give to users by default. If you use chatr on the binary to specify a page size, it is ignored.. otherwise the kernel makes a "best guess" based on the system configuration and the object size being created. That guess is then checked to be between (inclusively) vps_pagesize [minimum] and vps_ceiling [maximum] and adjusted appropriately.
So if you want your applications to get 16k large pages as much as possible by default -- you'd adjust vps_pagesize to 16. If you know that you'll be setting up large but sparse virtual ranges you might want to lower vps_ceiling to make sure the kernel doesn't give you 64k (or 16k or whatnot) pages when you touch that one byte.
There are man pages for both tunables on docs.hp.com (look under 11.11 -- that information should be relevant for 11.0).
For later releases, the man pages are on the system.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-08-2004 01:18 PM
тАО09-08-2004 01:18 PM
Re: Kernel memory page size
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-08-2004 07:30 PM
тАО09-08-2004 07:30 PM
Re: Kernel memory page size
rest assured, not remotely.
I was just curious to learn more about HP-UX Kernel innards.
I've even come accross an excellent book from HP (whose title I cannot recall) about the nitty gritty of kernel structs, memory management etc.
Unfortunately, there's always too little time to read (and hopefully remember) these more in-depth coverages on HP-UX
(Besides we're also blessed (or cursed) with other HW platforms and server OS's such as AIX, Solaris, Linux, OpenBSD etc., of which there is also so much to get known)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-09-2004 01:03 AM
тАО09-09-2004 01:03 AM
Re: Kernel memory page size
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-09-2004 01:17 AM
тАО09-09-2004 01:17 AM
Re: Kernel memory page size
that was the title I had a chance to browse through in our local technical bookstore.
But because of lack of time (the content at least looked quite demanding) I couldn't decide on buying a copy.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-09-2004 01:57 AM
тАО09-09-2004 01:57 AM
Re: Kernel memory page size
To be honest, much of it is beyond my real level of interest and ability to absorb. However, I have gained some insights that I didn't have before, and when I finish it I expect to have a few more. It has a good discussion on the paging system, including psuedo-swap. According to the book, vps_pagesize is the parameter that sets the base page size and defaults to 4Kbytes. It seems that the vps_cieling and vps_chatr_cieling are more reasonable to change. "The page size is determined by a 5-bit field in the htbl/pdir entry. The current implemented sizes range from 1 to 256K page frames (each progressively larger size is 4X the previous small size)."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-09-2004 02:49 AM
тАО09-09-2004 02:49 AM
Re: Kernel memory page size
dmesg | grep -iE 'Memory|Physical'
It will give informations about Physical page size and memory there.
It is updated there too.