Large database pages reduce I/O time because Derby can access more data with fewer I/Os. However, large pages require more memory. Derby allocates a bulk number of database pages in its page cache by default. If the page size is large, the system might run out of memory.
Here's a rough guideline: If the system is running Windows 95 and has more than 32 MB (or Windows NT and has more than 64 MB), it is probably beneficial to use 8K rather than 4K as the default page size.
Use the -mx flag as an optional parameter to the JVM to give the JVM more memory upon startup.
java -mx64 myApp
If you cannot afford the overhead of the minimum two pages per table, keep your page sizes small.